- GetNavHistoryAsync现在会自动检查是否有历史数据 - 无历史数据时自动调用BackfillNavHistoryInternalAsync - 拆分内部回填方法,避免重复验证权限
95 lines
2.4 KiB
C#
Executable File
95 lines
2.4 KiB
C#
Executable File
using SqlSugar;
|
|
|
|
namespace AssetManager.Data;
|
|
|
|
/// <summary>
|
|
/// 用户表
|
|
/// </summary>
|
|
[SugarTable("users")]
|
|
public class User
|
|
{
|
|
/// <summary>
|
|
/// 主键
|
|
/// </summary>
|
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
|
|
public string? Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// 微信OpenID (UK)
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "open_id", Length = 100, IsNullable = true)]
|
|
public string? OpenId { get; set; }
|
|
|
|
/// <summary>
|
|
/// 用户名
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "user_name", Length = 100)]
|
|
public string? UserName { get; set; }
|
|
|
|
/// <summary>
|
|
/// 邮箱
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "email", Length = 255, IsNullable = true)]
|
|
public string? Email { get; set; }
|
|
|
|
/// <summary>
|
|
/// 头像URL
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "avatar", Length = 500, IsNullable = true)]
|
|
public string? Avatar { get; set; }
|
|
|
|
/// <summary>
|
|
/// 会员等级
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "member_level", Length = 50)]
|
|
public string? MemberLevel { get; set; }
|
|
|
|
/// <summary>
|
|
/// 用户默认本位币 (CNY/USD/HKD)
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "default_currency", Length = 10)]
|
|
public string DefaultCurrency { get; set; } = "CNY";
|
|
|
|
/// <summary>
|
|
/// 连续运行天数
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "running_days")]
|
|
public int RunningDays { get; set; }
|
|
|
|
/// <summary>
|
|
/// 已捕获信号数
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "signals_captured")]
|
|
public int SignalsCaptured { get; set; }
|
|
|
|
/// <summary>
|
|
/// 模拟胜率
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "win_rate", ColumnDataType = "decimal(18,4)")]
|
|
public decimal WinRate { get; set; }
|
|
|
|
/// <summary>
|
|
/// 总交易次数
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "total_trades")]
|
|
public int TotalTrades { get; set; }
|
|
|
|
/// <summary>
|
|
/// 总收益金额
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "total_return", ColumnDataType = "decimal(18,4)")]
|
|
public decimal TotalReturn { get; set; }
|
|
|
|
/// <summary>
|
|
/// 注册时间
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "created_at")]
|
|
public DateTime CreatedAt { get; set; }
|
|
|
|
/// <summary>
|
|
/// 更新时间
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "updated_at")]
|
|
public DateTime UpdatedAt { get; set; }
|
|
}
|