20260707121253_AddSeibroBond.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace Infrastructure.Migrations.AppDb
  5. {
  6. /// <inheritdoc />
  7. public partial class AddSeibroBond : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.CreateTable(
  13. name: "BondEarlyRedemption",
  14. columns: table => new
  15. {
  16. ID = table.Column<int>(type: "int", nullable: false)
  17. .Annotation("SqlServer:Identity", "1, 1"),
  18. Isin = table.Column<string>(type: "nvarchar(12)", maxLength: 12, nullable: false, comment: "종목코드 (ISIN)"),
  19. KorSecnNm = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "한글종목명 (KOR_SECN_NM)"),
  20. XrcBeginDt = table.Column<DateOnly>(type: "date", nullable: true, comment: "행사시작일 (XRC_BEGIN_DT)"),
  21. XrcExpryDt = table.Column<DateOnly>(type: "date", nullable: true, comment: "행사종료일 (XRC_EXPRY_DT)"),
  22. ErlyRedDt = table.Column<DateOnly>(type: "date", nullable: false, comment: "조기상환일 (ERLY_RED_DT)"),
  23. OptionTpcd = table.Column<string>(type: "nvarchar(4)", maxLength: 4, nullable: true, comment: "옵션구분코드 (OPTION_TPCD)"),
  24. ApliIrate = table.Column<decimal>(type: "decimal(15,10)", nullable: true, comment: "적용이자율 (APLI_IRATE)"),
  25. ErlyRedamtVal = table.Column<decimal>(type: "decimal(20,2)", nullable: true, comment: "조기상환금액 (ERLY_REDAMT_VAL)"),
  26. IntPayAmt = table.Column<decimal>(type: "decimal(20,2)", nullable: true, comment: "이자지급금액 (INT_PAY_AMT)"),
  27. IssuRema = table.Column<decimal>(type: "decimal(20,2)", nullable: true, comment: "최근발행잔액 (ISSU_REMA)"),
  28. XrcRatio = table.Column<decimal>(type: "decimal(15,10)", nullable: true, comment: "행사비율 (XRC_RATIO)"),
  29. UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
  30. },
  31. constraints: table =>
  32. {
  33. table.PrimaryKey("PK_BondEarlyRedemption", x => x.ID);
  34. },
  35. comment: "SEIBro 채권 조기상환 정보 (getBondOptionXrcInfo) — Call/Put 옵션 행사 조기상환. 조기상환일 날짜 스윕");
  36. migrationBuilder.CreateTable(
  37. name: "BondInterestPayment",
  38. columns: table => new
  39. {
  40. Isin = table.Column<string>(type: "nvarchar(12)", maxLength: 12, nullable: false, comment: "종목코드 (ISIN, 요청값 스탬핑)"),
  41. CouponRate = table.Column<decimal>(type: "decimal(15,10)", nullable: true, comment: "표면이자율 (COUPON_RATE)"),
  42. IntPayWayTpcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "이자지급방법구분코드 (INT_PAY_WAY_TPCD)"),
  43. IntPayCycleTerms = table.Column<int>(type: "int", nullable: true, comment: "이자지급주기기간수 (INT_PAY_CYCLE_TERMS)"),
  44. IntPayCycleTpcd = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true, comment: "이자지급주기구분코드 (INT_PAY_CYCLE_TPCD)"),
  45. RvltSeverTpcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "절상절사구분코드 (RVLT_SEVER_TPCD)"),
  46. AcrintPayYn = table.Column<bool>(type: "bit", nullable: true, comment: "경과이자지급여부 (ACRINT_PAY_YN)"),
  47. BankHolidayIntPaydayTpcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "은행휴무일이자지급일구분코드 (BANK_HOLIDAY_INT_PAYDD_TPCD)"),
  48. IntPayTimsTpcd = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true, comment: "이자지급시기구분코드 (INT_PAY_TIMS_TPCD)"),
  49. BeforeDate = table.Column<DateOnly>(type: "date", nullable: true, comment: "직전이표일 (BEFORE_DATE)"),
  50. AfterDate = table.Column<DateOnly>(type: "date", nullable: true, comment: "차기이표일 (AFTER_DATE)"),
  51. UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
  52. },
  53. constraints: table =>
  54. {
  55. table.PrimaryKey("PK_BondInterestPayment", x => x.Isin);
  56. },
  57. comment: "SEIBro 채권 이자지급 정보 (getIntPayInfo) — 이자지급 주기·방식·직전/차기 이표일. PK Isin 스냅샷");
  58. migrationBuilder.CreateTable(
  59. name: "BondIssuance",
  60. columns: table => new
  61. {
  62. ID = table.Column<int>(type: "int", nullable: false)
  63. .Annotation("SqlServer:Identity", "1, 1"),
  64. IssuDt = table.Column<DateOnly>(type: "date", nullable: false, comment: "발행일자 (ISSU_DT)"),
  65. IssucoCustno = table.Column<int>(type: "int", nullable: true, comment: "발행회사고객번호 (ISSUCO_CUSTNO)"),
  66. IssucoCustNm = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "발행회사 명칭 (ISSUCO_CUST_NM)"),
  67. Isin = table.Column<string>(type: "nvarchar(12)", maxLength: 12, nullable: false, comment: "종목코드 (ISIN)"),
  68. KorSecnNm = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "한글종목명 (KOR_SECN_NM)"),
  69. UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
  70. },
  71. constraints: table =>
  72. {
  73. table.PrimaryKey("PK_BondIssuance", x => x.ID);
  74. },
  75. comment: "SEIBro 채권 발행내역 (getBondIssuInfo) — 회사채·주식관련사채. BondMaster rolling 발견 소스");
  76. migrationBuilder.CreateTable(
  77. name: "BondMaster",
  78. columns: table => new
  79. {
  80. Isin = table.Column<string>(type: "nvarchar(12)", maxLength: 12, nullable: false, comment: "종목코드 (ISIN)"),
  81. IssucoCustno = table.Column<int>(type: "int", nullable: true, comment: "발행사 번호 (ISSUCO_CUSTNO)"),
  82. KorSecnNm = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "한글종목명 (KOR_SECN_NM)"),
  83. SecnKacd = table.Column<string>(type: "nvarchar(4)", maxLength: 4, nullable: true, comment: "종목종류코드 (SECN_KACD)"),
  84. IssuDt = table.Column<DateOnly>(type: "date", nullable: true, comment: "발행일자 (ISSU_DT)"),
  85. XpirDt = table.Column<DateOnly>(type: "date", nullable: true, comment: "만기일자 (XPIR_DT)"),
  86. IssuCurCd = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: true, comment: "발행통화코드 (ISSU_CUR_CD)"),
  87. FirstIssuAmt = table.Column<decimal>(type: "decimal(24,4)", nullable: true, comment: "최초발행금액 (FIRST_ISSU_AMT)"),
  88. IssuRema = table.Column<decimal>(type: "decimal(20,2)", nullable: true, comment: "발행잔액 (ISSU_REMA)"),
  89. PayinAmt = table.Column<decimal>(type: "decimal(20,2)", nullable: true, comment: "납입금액 (PAYIN_AMT)"),
  90. CouponRate = table.Column<decimal>(type: "decimal(15,10)", nullable: true, comment: "표면이자율 (COUPON_RATE)"),
  91. XpiredRate = table.Column<decimal>(type: "decimal(16,10)", nullable: true, comment: "만기상환율 (XPIRED_RATE)"),
  92. RecuWhcd = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true, comment: "모집방법코드 (RECU_WHCD)"),
  93. IssuWhcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "발행방법코드 (ISSU_WHCD)"),
  94. ParticulBondKindTpcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "특이채권종류구분코드 (PARTICUL_BOND_KIND_TPCD)"),
  95. OptionTpcd = table.Column<string>(type: "nvarchar(4)", maxLength: 4, nullable: true, comment: "옵션구분코드 (OPTION_TPCD)"),
  96. ForcErlyRedYn = table.Column<bool>(type: "bit", nullable: true, comment: "강제조기상환여부 (FORC_ERLY_RED_YN)"),
  97. MrChgTpcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "금리변동구분코드 (MR_CHG_TPCD)"),
  98. RegiOrgTpcd = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true, comment: "등록기관구분코드 (REGI_ORG_TPCD)"),
  99. GrtyTpcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "보증구분코드 (GRTY_TPCD)"),
  100. SignaTpcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "기명구분코드 (SIGNA_TPCD)"),
  101. RankTpcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "순위구분코드 (RANK_TPCD)"),
  102. IntPayWayTpcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "이자지급방법구분코드 (INT_PAY_WAY_TPCD)"),
  103. SintCintTpcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "단리복리구분코드 (SINT_CINT_TPCD)"),
  104. IrateChgTpcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "이자율변동구분코드 (IRATE_CHG_TPCD)"),
  105. XpirGuarPrate = table.Column<decimal>(type: "decimal(15,10)", nullable: true, comment: "만기보장수익율 (XPIR_GUAR_PRATE)"),
  106. XpirGuarPrateTpcd = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true, comment: "만기보장수익율구분코드 (XPIR_GUAR_PRATE_TPCD)"),
  107. PrcpRedWhcd = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true, comment: "원금상환방법코드 (PRCP_RED_WHCD)"),
  108. ApliDt = table.Column<DateOnly>(type: "date", nullable: true, comment: "상장일 (APLI_DT)"),
  109. DlistDt = table.Column<DateOnly>(type: "date", nullable: true, comment: "상장폐지일자 (DLIST_DT)"),
  110. KisValatGrdCd = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: true, comment: "KIS평가등급코드 (KIS_VALAT_GRD_CD)"),
  111. NiceValatGrdCd = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: true, comment: "NICE평가등급코드 (NICE_VALAT_GRD_CD)"),
  112. SciValatGrdCd = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: true, comment: "서울신용평가등급코드 (SCI_VALAT_GRD_CD)"),
  113. KrValatGrdCd = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: true, comment: "한국기업평가등급코드 (KR_VALAT_GRD_CD)"),
  114. EltscYn = table.Column<bool>(type: "bit", nullable: true, comment: "전자증권여부 (ELTSC_YN)"),
  115. ExerMbodyTpcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "권리행사주체 (EXER_MBODY_TPCD)"),
  116. IntEstmMannTpcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "이자산정방식 (INT_ESTM_MANN_TPCD)"),
  117. UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
  118. },
  119. constraints: table =>
  120. {
  121. table.PrimaryKey("PK_BondMaster", x => x.Isin);
  122. },
  123. comment: "SEIBro 채권 종목 정보 (getBondStatInfo) — 만기·표면이자율·옵션·보증·신용등급 4사(KIS/NICE/SCI/KR). 신용등급 유일 소스");
  124. migrationBuilder.CreateTable(
  125. name: "CdMaster",
  126. columns: table => new
  127. {
  128. Isin = table.Column<string>(type: "nvarchar(12)", maxLength: 12, nullable: false, comment: "종목코드 (ISIN, 요청값 스탬핑)"),
  129. IssucoCustno = table.Column<int>(type: "int", nullable: true, comment: "발행사 번호 (ISSUCO_CUSTNO)"),
  130. KorSecnNm = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "한글종목명 (KOR_SECN_NM)"),
  131. IssuCurCd = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: true, comment: "발행통화코드 (ISSU_CUR_CD)"),
  132. FirstIssuAmt = table.Column<decimal>(type: "decimal(24,4)", nullable: true, comment: "최초발행금액 (FIRST_ISSU_AMT)"),
  133. IssuWhcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "발행방법코드 (ISSU_WHCD)"),
  134. FaceAmt = table.Column<decimal>(type: "decimal(20,2)", nullable: true, comment: "액면금액 (FACE_AMT)"),
  135. SaleAmt = table.Column<decimal>(type: "decimal(20,2)", nullable: true, comment: "매출금액 (SALE_AMT)"),
  136. DiscnRate = table.Column<decimal>(type: "decimal(15,10)", nullable: true, comment: "할인율 (DISCN_RATE)"),
  137. IntPayMannTpcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "이자지급방식구분코드 (INT_PAY_MANN_TPCD)"),
  138. IssuDt = table.Column<DateOnly>(type: "date", nullable: true, comment: "발행일자 (ISSU_DT)"),
  139. XpirDt = table.Column<DateOnly>(type: "date", nullable: true, comment: "만기일자 (XPIR_DT) — CD 상환일"),
  140. EltscYn = table.Column<bool>(type: "bit", nullable: true, comment: "전자증권 여부 (ELTSC_YN)"),
  141. UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
  142. },
  143. constraints: table =>
  144. {
  145. table.PrimaryKey("PK_CdMaster", x => x.Isin);
  146. },
  147. comment: "SEIBro CD 종목 정보 (getCDInfo) — 발행금액·할인율·이자지급방식·만기. PK Isin");
  148. migrationBuilder.CreateTable(
  149. name: "CpMaster",
  150. columns: table => new
  151. {
  152. Isin = table.Column<string>(type: "nvarchar(12)", maxLength: 12, nullable: false, comment: "종목코드 (ISIN, 요청값 스탬핑)"),
  153. IssucoCustno = table.Column<int>(type: "int", nullable: true, comment: "발행사 번호 (ISSUCO_CUSTNO)"),
  154. KorSecnNm = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "한글종목명 (KOR_SECN_NM)"),
  155. IssuCurCd = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: true, comment: "발행통화코드 (ISSU_CUR_CD)"),
  156. IssuAmt = table.Column<decimal>(type: "decimal(24,4)", nullable: true, comment: "발행금액 (ISSU_AMT)"),
  157. SecnKacd = table.Column<string>(type: "nvarchar(4)", maxLength: 4, nullable: true, comment: "종목종류코드 (SECN_KACD)"),
  158. BillCacd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "어음분류코드 (BILL_CACD)"),
  159. IssuWhcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "발행방법코드 (ISSU_WHCD)"),
  160. SaleDt = table.Column<DateOnly>(type: "date", nullable: true, comment: "매출일자 (SALE_DT)"),
  161. IntPayMannTpcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "이자지급방식구분코드 (INT_PAY_MANN_TPCD)"),
  162. IssuDt = table.Column<DateOnly>(type: "date", nullable: true, comment: "발행일자 (ISSU_DT)"),
  163. XpirDt = table.Column<DateOnly>(type: "date", nullable: true, comment: "만기일자 (XPIR_DT)"),
  164. DiscnOrgCustno = table.Column<int>(type: "int", nullable: true, comment: "할인기관고객번호 (DISCN_ORG_CUSTNO)"),
  165. DiscnOrdNm = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "할인기관명 (DISCN_ORD_NM)"),
  166. PayBankBrono = table.Column<int>(type: "int", nullable: true, comment: "지급은행지점번호 (PAY_BANK_BRONO)"),
  167. BankNm = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "지급은행명 (BANK_NM)"),
  168. WholdTpcd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "원천징수구분코드 (WHOLD_TPCD)"),
  169. KisValatGrdCd = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: true, comment: "KIS평가등급코드 (KIS_VALAT_GRD_CD)"),
  170. NiceValatGrdCd = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: true, comment: "NICE평가등급코드 (NICE_VALAT_GRD_CD)"),
  171. SciValatGrdCd = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: true, comment: "서울신용평가등급코드 (SCI_VALAT_GRD_CD)"),
  172. KrValatGrdCd = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: true, comment: "한국기업평가등급코드 (KR_VALAT_GRD_CD)"),
  173. UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
  174. },
  175. constraints: table =>
  176. {
  177. table.PrimaryKey("PK_CpMaster", x => x.Isin);
  178. },
  179. comment: "SEIBro CP 종목 정보 (getCPInfo) — 발행·할인기관·지급은행·원천징수·신용등급 4사. PK Isin");
  180. migrationBuilder.CreateTable(
  181. name: "EstbMaster",
  182. columns: table => new
  183. {
  184. Isin = table.Column<string>(type: "nvarchar(12)", maxLength: 12, nullable: false, comment: "종목코드 (ISIN, 요청값 스탬핑)"),
  185. IssucoCustno = table.Column<int>(type: "int", nullable: true, comment: "발행회사 고객번호 (ISSUCO_CUSTNO)"),
  186. EstbKacd = table.Column<string>(type: "nvarchar(1)", maxLength: 1, nullable: true, comment: "전자단기사채종류코드 (ESTB_KACD)"),
  187. KorSecnNm = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "한글종목명 (KOR_SECN_NM)"),
  188. IssuCurCd = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: true, comment: "발행통화코드 (ISSU_CUR_CD)"),
  189. IssuAmt = table.Column<decimal>(type: "decimal(20,2)", nullable: true, comment: "발행금액 (ISSU_AMT)"),
  190. RecuWhcd = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: true, comment: "모집방법코드 (RECU_WHCD)"),
  191. IssuDt = table.Column<DateOnly>(type: "date", nullable: true, comment: "발행일자 (ISSU_DT)"),
  192. XpirDt = table.Column<DateOnly>(type: "date", nullable: true, comment: "만기일자 (XPIR_DT)"),
  193. Dayobj = table.Column<string>(type: "nvarchar(8)", maxLength: 8, nullable: true, comment: "일물 (DAYOBJ) — 만기일-발행일"),
  194. WholdYn = table.Column<bool>(type: "bit", nullable: true, comment: "원천징수여부 (WHOLD_YN)"),
  195. GrorgYn = table.Column<bool>(type: "bit", nullable: true, comment: "보증여부 (GRORG_YN)"),
  196. KisValatGrdCd = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: true, comment: "KIS평가등급코드 (KIS_VALAT_GRD_CD)"),
  197. NiceValatGrdCd = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: true, comment: "NICE평가등급코드 (NICE_VALAT_GRD_CD)"),
  198. SciValatGrdCd = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: true, comment: "서울신용평가등급코드 (SCI_VALAT_GRD_CD)"),
  199. KrValatGrdCd = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: true, comment: "한국기업평가등급코드 (KR_VALAT_GRD_CD)"),
  200. UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
  201. },
  202. constraints: table =>
  203. {
  204. table.PrimaryKey("PK_EstbMaster", x => x.Isin);
  205. },
  206. comment: "SEIBro 전자단기사채 종목 정보 (getESTBInfo) — 발행·만기·일물·모집방법·신용등급 4사. PK Isin");
  207. migrationBuilder.CreateTable(
  208. name: "ShortTermIssuance",
  209. columns: table => new
  210. {
  211. ID = table.Column<int>(type: "int", nullable: false)
  212. .Annotation("SqlServer:Identity", "1, 1"),
  213. Isin = table.Column<string>(type: "nvarchar(12)", maxLength: 12, nullable: false, comment: "종목코드 (ISIN)"),
  214. KorSecnNm = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "한글종목명 (KOR_SECN_NM)"),
  215. IssucoCustno = table.Column<int>(type: "int", nullable: true, comment: "발행회사고객번호 (ISSUCO_CUSTNO)"),
  216. IssucoCustNm = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true, comment: "발행회사 명칭 (ISSUCO_CUST_NM)"),
  217. SecnTpcd = table.Column<string>(type: "nvarchar(2)", maxLength: 2, nullable: false, comment: "종목구분코드 (SECN_TPCD, 요청값 스탬핑) — 12어음(CP) 13CD 14전단채"),
  218. IssuDt = table.Column<DateOnly>(type: "date", nullable: false, comment: "발행일자 (ISSU_DT, 요청값 스탬핑)"),
  219. UpdatedAt = table.Column<DateTime>(type: "datetime2", nullable: false)
  220. },
  221. constraints: table =>
  222. {
  223. table.PrimaryKey("PK_ShortTermIssuance", x => x.ID);
  224. },
  225. comment: "SEIBro 단기금융증권 발행내역 (getShortmIssuInfo) — CD/CP/전단채. Cd/Cp/EstbMaster rolling 발견 소스");
  226. migrationBuilder.CreateIndex(
  227. name: "IX_BondEarlyRedemption_ErlyRedDt",
  228. table: "BondEarlyRedemption",
  229. column: "ErlyRedDt");
  230. migrationBuilder.CreateIndex(
  231. name: "IX_BondEarlyRedemption_Isin_ErlyRedDt",
  232. table: "BondEarlyRedemption",
  233. columns: new[] { "Isin", "ErlyRedDt" },
  234. unique: true);
  235. migrationBuilder.CreateIndex(
  236. name: "IX_BondIssuance_Isin",
  237. table: "BondIssuance",
  238. column: "Isin",
  239. unique: true);
  240. migrationBuilder.CreateIndex(
  241. name: "IX_BondIssuance_IssuDt",
  242. table: "BondIssuance",
  243. column: "IssuDt");
  244. migrationBuilder.CreateIndex(
  245. name: "IX_BondMaster_IssucoCustno",
  246. table: "BondMaster",
  247. column: "IssucoCustno");
  248. migrationBuilder.CreateIndex(
  249. name: "IX_BondMaster_XpirDt",
  250. table: "BondMaster",
  251. column: "XpirDt");
  252. migrationBuilder.CreateIndex(
  253. name: "IX_CdMaster_IssuDt",
  254. table: "CdMaster",
  255. column: "IssuDt");
  256. migrationBuilder.CreateIndex(
  257. name: "IX_CpMaster_IssuDt",
  258. table: "CpMaster",
  259. column: "IssuDt");
  260. migrationBuilder.CreateIndex(
  261. name: "IX_EstbMaster_IssuDt",
  262. table: "EstbMaster",
  263. column: "IssuDt");
  264. migrationBuilder.CreateIndex(
  265. name: "IX_ShortTermIssuance_Isin",
  266. table: "ShortTermIssuance",
  267. column: "Isin",
  268. unique: true);
  269. migrationBuilder.CreateIndex(
  270. name: "IX_ShortTermIssuance_SecnTpcd_IssuDt",
  271. table: "ShortTermIssuance",
  272. columns: new[] { "SecnTpcd", "IssuDt" });
  273. }
  274. /// <inheritdoc />
  275. protected override void Down(MigrationBuilder migrationBuilder)
  276. {
  277. migrationBuilder.DropTable(
  278. name: "BondEarlyRedemption");
  279. migrationBuilder.DropTable(
  280. name: "BondInterestPayment");
  281. migrationBuilder.DropTable(
  282. name: "BondIssuance");
  283. migrationBuilder.DropTable(
  284. name: "BondMaster");
  285. migrationBuilder.DropTable(
  286. name: "CdMaster");
  287. migrationBuilder.DropTable(
  288. name: "CpMaster");
  289. migrationBuilder.DropTable(
  290. name: "EstbMaster");
  291. migrationBuilder.DropTable(
  292. name: "ShortTermIssuance");
  293. }
  294. }
  295. }