using Hotline.Share.Enums.Snapshot;
using SqlSugar;
using System.ComponentModel;
using XF.Domain.Repository;
using Hotline.Orders;
using Hotline.Share.Enums.User;
using Hotline.Snapshot;
using Hotline.Share.Enums.ThirdAccount;

namespace Hotline.ThirdAccountDomainServices;

/// <summary>
/// 随手拍用户微信小程序登录信息
/// </summary>
[Description("小程序账号信息")]
public class ThirdAccount : CreationSoftDeleteEntity
{
    /// <summary>
    /// 外部业务唯一标识
    /// </summary>
    [SugarColumn(ColumnDescription = "外部业务唯一标识")]
    public string? ExternalId { get; set; }

    /// <summary>
    /// 电话
    /// </summary>
    [SugarColumn(ColumnDescription = "电话")]
    public string? PhoneNumber { get; set; }

    /// <summary>
    /// 第三方平台的Id
    /// 例如: 微信的OpenId
    /// </summary>
    [SugarColumn(ColumnDescription = "第三方平台的Id")]
    public string OpenId { get; set; }

    /// <summary>
    /// 第三方平台的SessionKey
    /// 例如: 微信SessionKey
    /// </summary>
    [SugarColumn(ColumnDescription = "第三方平台的SessionKey")]
    public string? SessionKey { get; set; }

    /// <summary>
    /// 账号类型
    /// </summary>
    public EThirdType AccountType { get; set; }

    /// <summary>
    /// 用户头像Url
    /// </summary>
    [SugarColumn(ColumnDescription = "用户头像Url")]
    public string? HeadImgUrl { get; set; }

    /// <summary>
    /// 用户昵称
    /// </summary>
    [SugarColumn(ColumnDescription = "用户昵称")]
    public string? UserName { get; set; }

    /// <summary>
    /// 用户在开放平台的唯一标识符。本字段在满足一定条件的情况下才返回。具体参看：https://mp.weixin.qq.com/debug/wxadoc/dev/api/uinionID.html
    /// </summary>
    [SugarColumn(ColumnDescription = "用户在开放平台的唯一标识符")]
    public string? UnIonId { get; set; }

    /// <summary>
    /// 应用类型
    /// </summary>
    [SugarColumn(ColumnDescription = "应用类型", DefaultValue = "1")]
    public EAppType AppType { get; set; }
}
