fix(enum): InterestModeEnum/InterestTypeEnum 显式赋值, 钉死 DB 契约

原枚举成员无显式值, 靠声明顺序隐式得 0..9。
DB(swap_position.InterestMode)、ConsTrade.InterestModels、
SwapFlowEvent(InterestMode==0) 全部依赖此顺序。
一旦有人重排或插入成员, int 映射静默错乱——最难查的 bug。

显式赋值: Unknown=0, 固定值=1, ... 标的期初全价=9。
InterestTypeEnum 同理: 单利=0, 复利=1。

值与原隐式顺序完全一致, 行为零变化。
验证: 编译0错误, 全量507测试7失败(基线一致)。
This commit is contained in:
hjhan
2026-08-11 11:30:59 +08:00
parent e35a738d2e
commit 8f677d4cb7
@@ -11,23 +11,23 @@ namespace YLErp.DBModels
/// </summary>
public enum InterestModeEnum
{
Unknown,
,
,
,
,
,
,
,
,
Unknown = 0,
= 1,
= 2,
= 3,
= 4,
= 5,
= 6,
= 7,
= 8,
= 9
}
/// <summary>
/// 计息方式
/// </summary>
public enum InterestTypeEnum
{
,
= 0,
= 1
}
}