using SqlSugar;
namespace AssetManager.Data;
///
/// 用户策略实例表
///
[SugarTable("strategies")]
public class Strategy
{
///
/// 主键
///
[SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
public string Id { get; set; }
///
/// 所属用户ID
///
[SugarColumn(ColumnName = "user_id", Length = 100, IndexGroupNameList = new string[] { "idx_user_id" })]
public string UserId { get; set; }
///
/// 策略别名/名称
///
[SugarColumn(ColumnName = "alias", Length = 200)]
public string Alias { get; set; }
///
/// 策略类型 (如: ma_trend, chandelier_exit, risk_parity)
///
[SugarColumn(ColumnName = "type", Length = 50)]
public string Type { get; set; }
///
/// 策略描述
///
[SugarColumn(ColumnName = "description", Length = 500)]
public string Description { get; set; }
///
/// 策略标签 (逗号分隔的字符串)
///
[SugarColumn(ColumnName = "tags")]
public string Tags { get; set; }
///
/// 风险等级
///
[SugarColumn(ColumnName = "risk_level", Length = 20)]
public string RiskLevel { get; set; }
///
/// 策略配置项(周期,阈值,资产配比)
///
[SugarColumn(ColumnName = "config", IsJson = true)]
public string Config { get; set; }
///
/// 创建时间
///
[SugarColumn(ColumnName = "created_at")]
public DateTime CreatedAt { get; set; }
///
/// 更新时间
///
[SugarColumn(ColumnName = "updated_at")]
public DateTime UpdatedAt { get; set; }
}