Files
zszq-trs/YLErpDAL/Modules/SwapModule/Margin/GuaranteeMargin.cs
T
hjhan 55284fb76b refactor(margin): 抽出独立 Margin 限界上下文,移除 PrepayLeg 错误继承
- 新建 YLErp.Modules.SwapModule.Margin:MarginBalance / MarginLeg / IMarginResolver(Cash/Credit/Guarantee)

- MarginLeg 不继承 IInterestLegStrategy,与利息腿完全解耦(保证金是客户存款/担保,非互换腿)

- 删除 PrepayLeg,工厂不再注册 mode 5/6 预付金

- 预付金用例迁入 MarginLegTest,旧 InterestLegStrategyTest 改为断言预付金已非利息腿
2026-08-10 22:09:09 +08:00

11 lines
353 B
C#

namespace YLErp.Modules.SwapModule.Margin;
/// <summary>担保品:计息余额 = 担保品市值。</summary>
public sealed class GuaranteeMargin : IMarginResolver
{
public MarginForm Form => MarginForm.Guarantee;
public MarginBalance Resolve(decimal postedAmount, decimal accrualFactor = 1m)
=> new(postedAmount * accrualFactor);
}