초기커밋
This commit is contained in:
163
ServerCommon/z.Backup/AccountEntity.cs
Normal file
163
ServerCommon/z.Backup/AccountEntity.cs
Normal file
@@ -0,0 +1,163 @@
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Text;
|
||||
//using System.Threading.Tasks;
|
||||
|
||||
//using Amazon.DynamoDBv2;
|
||||
//using Amazon.DynamoDBv2.Model;
|
||||
//using Amazon.DynamoDBv2.DocumentModel;
|
||||
//using Newtonsoft.Json;
|
||||
//using Google.Protobuf.WellKnownTypes;
|
||||
//using ServerCore; using ServerBase;
|
||||
|
||||
|
||||
|
||||
//namespace ServerCommon.DB
|
||||
//{
|
||||
// public class AccountAttr
|
||||
// {
|
||||
// // AccountGUID 값
|
||||
// [JsonProperty("aid")]
|
||||
// public string Aid { get; set; } = string.Empty;
|
||||
|
||||
// // AccountID 값 (사용자 입력 ID or 웹인증 ID)
|
||||
// [JsonProperty("id"),]
|
||||
// public string Id { get; set; } = string.Empty;
|
||||
|
||||
// [JsonProperty("password")]
|
||||
// public string Password { get; set; } = string.Empty;
|
||||
|
||||
// [JsonProperty("pin")]
|
||||
// public string Pin { get; set; } = string.Empty;
|
||||
|
||||
// [JsonProperty("language")]
|
||||
// public LanguageType Language { get; set; } = LanguageType.None;
|
||||
|
||||
// [JsonProperty("e-mail")]
|
||||
// public string Email { get; set; } = string.Empty;
|
||||
|
||||
// [JsonProperty("connect_metamask")]
|
||||
// public string ConnectMetamask { get; set; } = string.Empty;
|
||||
|
||||
// [JsonProperty("connect_kaikas")]
|
||||
// public string ConnectKaikas { get; set; } = string.Empty;
|
||||
|
||||
// [JsonProperty("connect_facebook")]
|
||||
// public string ConnectFacebook { get; set; } = string.Empty;
|
||||
|
||||
// [JsonProperty("connect_google")]
|
||||
// public string ConnectGoogle { get; set; } = string.Empty;
|
||||
|
||||
// [JsonProperty("connect_naver")]
|
||||
// public string ConnectNaver { get; set; } = string.Empty;
|
||||
|
||||
// [JsonProperty("connect_kakao")]
|
||||
// public string ConnectKakao { get; set; } = string.Empty;
|
||||
|
||||
// [JsonProperty("connect_facewallet")]
|
||||
// public string ConnectFacewallet { get; set; } = string.Empty;
|
||||
|
||||
// [JsonProperty("profile_img")]
|
||||
// public string ProfileImg { get; set; } = string.Empty;
|
||||
|
||||
// [JsonProperty("membership")]
|
||||
// public string Membership { get; set; } = string.Empty;
|
||||
|
||||
// // 추천인
|
||||
// [JsonProperty("referral")]
|
||||
// public string Referral { get; set; } = string.Empty;
|
||||
|
||||
// [JsonProperty("create_date")]
|
||||
// public DateTime CreateDate = DateTime.UtcNow;
|
||||
|
||||
// [JsonProperty("blockStartDate")]
|
||||
// public DateTime BlockStartDate { get; set; } = DateTime.UtcNow;
|
||||
|
||||
// [JsonProperty("blockEndDate")]
|
||||
// public DateTime BlockEndDate { get; set; } = DateTime.UtcNow;
|
||||
|
||||
// [JsonProperty("blockPolicy")]
|
||||
// public List<string> blockPolicy { get; set; } = new();
|
||||
|
||||
// [JsonProperty("blockReason")]
|
||||
// public string blockReason { get; set; } = string.Empty;
|
||||
|
||||
// [JsonProperty("auth_admin_level_type")]
|
||||
// public AuthAdminLevelType m_auth_admin_level_type { get; set; } = AuthAdminLevelType.None;
|
||||
|
||||
// // 아래 두개는 별로로 분리할 필요있음
|
||||
// // 현재 Logout은 기록하지 않음.
|
||||
// [JsonProperty]
|
||||
// public DateTime LoginDate = DateTime.UtcNow;
|
||||
|
||||
// [JsonProperty,]
|
||||
// public DateTime LogoutDate = DateTime.UtcNow;
|
||||
|
||||
|
||||
|
||||
|
||||
// public bool Read(string guid, TestUserCreateData userData)
|
||||
// {
|
||||
// Aid = guid;
|
||||
// Id = userData.Id;
|
||||
// Password = userData.Password;
|
||||
// //Pin = userData.Pin; 제거 - kangms
|
||||
// Language = userData.Language;
|
||||
|
||||
// // TODO: ConnectFacewallet 유지보수 필요 테이블에 추가하던지 다른이용방안이 필요함
|
||||
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
|
||||
// public class AccountEntity
|
||||
// {
|
||||
// public string PK_Guid { get; private set; } = string.Empty;
|
||||
// public string SK_Guid { get; private set; } = string.Empty;
|
||||
// public AccountAttr Attr { get; private set; } = new AccountAttr();
|
||||
|
||||
// public AccountEntity(Document document)
|
||||
// {
|
||||
// ReadFrom(document);
|
||||
// }
|
||||
|
||||
// void ReadFrom(Document document)
|
||||
// {
|
||||
// PK_Guid = document["PK"].AsString().Replace(MainDB.GetPKPrefix(EEntityType.Account), "");
|
||||
// SK_Guid = document["SK"].AsString().Replace(MainDB.GetSKPrefix(EEntityType.Account), "");
|
||||
|
||||
// Log.getLogger().debug(document["Attr"].AsString());
|
||||
|
||||
// AccountAttr? attr = JsonConvert.DeserializeObject<AccountAttr>(document["Attr"].AsString());
|
||||
// if (attr == null)
|
||||
// throw new Exception("Attr DeserializeObject error");
|
||||
|
||||
// // 임시
|
||||
// if (attr.Id == null)
|
||||
// {
|
||||
// throw new Exception("attr.Id == null");
|
||||
// }
|
||||
|
||||
// Log.getLogger().debug(JsonConvert.SerializeObject(attr));
|
||||
// //
|
||||
// Attr = attr;
|
||||
// }
|
||||
|
||||
// public void UpdateLoginTime(DateTime loginTime)
|
||||
// {
|
||||
// Attr.LoginDate = loginTime;
|
||||
// }
|
||||
|
||||
// public Document DocumentForUpdate()
|
||||
// {
|
||||
// var document = new Document();
|
||||
// document["PK"] = MainDB.MakePK(EEntityType.Account, PK_Guid);
|
||||
// document["SK"] = MainDB.MakeSK(EEntityType.Account, SK_Guid);
|
||||
// document["Attr"] = JsonConvert.SerializeObject(Attr);
|
||||
|
||||
// Log.getLogger().debug(JsonConvert.SerializeObject(Attr));
|
||||
// return document;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
Reference in New Issue
Block a user