|
|
@@ -1,31 +1,31 @@
|
|
|
// 모의투자(Paper Trading) 도메인 타입 — Backend Application/Features/Api/Paper/*/Response.cs 대응 (camelCase 직렬화)
|
|
|
-// ⚠️ enum 은 Web.Api 에 JsonStringEnumConverter 미등록 → byte 값(숫자)으로 직렬화됨.
|
|
|
-// (Stocks 는 Response 에서 .ToString() 으로 문자열화했으나 Paper 는 raw enum 타입 그대로라 숫자 전송)
|
|
|
+// enum 은 Backend Response DTO 에서 .ToString() 으로 문자열화됨 (Stocks 컨벤션 통일 — enum.ToString() PascalCase).
|
|
|
+// 값은 Domain/Entities/Paper/ValueObject/* 의 enum 멤버명과 정확히 일치.
|
|
|
|
|
|
-// ── enum (byte 값, d4 §③ / Domain/Entities/Paper/ValueObject/*) ──
|
|
|
+// ── enum (문자열 값 = enum 멤버명, d4 §③ / Domain/Entities/Paper/ValueObject/*) ──
|
|
|
export const PaperOrderSide = {
|
|
|
- Buy: 1,
|
|
|
- Sell: 2
|
|
|
+ Buy: 'Buy',
|
|
|
+ Sell: 'Sell'
|
|
|
} as const;
|
|
|
export type PaperOrderSideValue = (typeof PaperOrderSide)[keyof typeof PaperOrderSide];
|
|
|
|
|
|
export const PaperFillRule = {
|
|
|
- Open: 1,
|
|
|
- Close: 2
|
|
|
+ Open: 'Open',
|
|
|
+ Close: 'Close'
|
|
|
} as const;
|
|
|
export type PaperFillRuleValue = (typeof PaperFillRule)[keyof typeof PaperFillRule];
|
|
|
|
|
|
export const PaperOrderStatus = {
|
|
|
- Pending: 1,
|
|
|
- Filled: 2,
|
|
|
- Cancelled: 3,
|
|
|
- Rejected: 4
|
|
|
+ Pending: 'Pending',
|
|
|
+ Filled: 'Filled',
|
|
|
+ Cancelled: 'Cancelled',
|
|
|
+ Rejected: 'Rejected'
|
|
|
} as const;
|
|
|
export type PaperOrderStatusValue = (typeof PaperOrderStatus)[keyof typeof PaperOrderStatus];
|
|
|
|
|
|
export const PaperLedgerType = {
|
|
|
- Deposit: 1,
|
|
|
- Withdraw: 2
|
|
|
+ Deposit: 'Deposit',
|
|
|
+ Withdraw: 'Withdraw'
|
|
|
} as const;
|
|
|
export type PaperLedgerTypeValue = (typeof PaperLedgerType)[keyof typeof PaperLedgerType];
|
|
|
|