using System;
using System.Collections.Generic;

namespace HoneyBox.Model.Entities;

/// <summary>
/// 用户主表，存储用户基本信息、账户余额、积分等
/// </summary>
public partial class User
{
    /// <summary>
    /// 主键ID
    /// </summary>
    public int Id { get; set; }

    /// <summary>
    /// 微信openid
    /// </summary>
    public string OpenId { get; set; } = null!;

    /// <summary>
    /// 微信unionid
    /// </summary>
    public string? UnionId { get; set; }

    /// <summary>
    /// 公众号openid
    /// </summary>
    public string? GzhOpenId { get; set; }

    /// <summary>
    /// 用户唯一标识
    /// </summary>
    public string Uid { get; set; } = null!;

    /// <summary>
    /// 手机号
    /// </summary>
    public string? Mobile { get; set; }

    /// <summary>
    /// 旧手机号
    /// </summary>
    public string? OldMobile { get; set; }

    /// <summary>
    /// 昵称
    /// </summary>
    public string Nickname { get; set; } = null!;

    /// <summary>
    /// 头像URL
    /// </summary>
    public string HeadImg { get; set; } = null!;

    /// <summary>
    /// 密码
    /// </summary>
    public string? Password { get; set; }

    /// <summary>
    /// 分享图片URL
    /// </summary>
    public string? ShareImage { get; set; }

    /// <summary>
    /// 账户余额
    /// </summary>
    public decimal Money { get; set; }

    /// <summary>
    /// 余额2/积分2
    /// </summary>
    public decimal? Money2 { get; set; }

    /// <summary>
    /// 积分
    /// </summary>
    public decimal Integral { get; set; }

    /// <summary>
    /// 评分
    /// </summary>
    public decimal Score { get; set; }

    /// <summary>
    /// 欧气值
    /// </summary>
    public int? OuQi { get; set; }

    /// <summary>
    /// 欧气等级
    /// </summary>
    public int? OuQiLevel { get; set; }

    /// <summary>
    /// 推荐人ID
    /// </summary>
    public int Pid { get; set; }

    /// <summary>
    /// VIP等级
    /// </summary>
    public byte Vip { get; set; }

    /// <summary>
    /// 抽奖次数
    /// </summary>
    public int? DrawNum { get; set; }

    /// <summary>
    /// 盲盒数量
    /// </summary>
    public int? MbNumber { get; set; }

    /// <summary>
    /// 点击ID
    /// </summary>
    public int? ClickId { get; set; }

    /// <summary>
    /// 是否使用优惠券: 0否 1是
    /// </summary>
    public byte? IsUseCoupon { get; set; }

    /// <summary>
    /// 状态: 1正常 0禁用
    /// </summary>
    public byte Status { get; set; }

    /// <summary>
    /// 是否测试账号: 0否 1是
    /// </summary>
    public int IsTest { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreatedAt { get; set; }

    /// <summary>
    /// 更新时间
    /// </summary>
    public DateTime UpdatedAt { get; set; }

    /// <summary>
    /// 最后登录时间
    /// </summary>
    public DateTime? LastLoginTime { get; set; }
}
