generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "sqlserver"
  url      = env("DATABASE_URL")
}

model SD_SURVEY_SALES_BASIC_INFO {
  ID                    Int                          @id @default(autoincrement())
  SRL_NO                String                       @db.NVarChar(20)
  REPRESENTATIVE        String                       @db.NVarChar(200)
  STORE                 String?                      @db.NVarChar(200)
  CONSTRUCTION_POINT    String?                      @db.NVarChar(200)
  INVESTIGATION_DATE    String?                      @db.NVarChar(10)
  BUILDING_NAME         String?                      @db.NVarChar(200)
  CUSTOMER_NAME         String?                      @db.NVarChar(200)
  POST_CODE             String?                      @db.NVarChar(10)
  ADDRESS               String?                      @db.NVarChar(200)
  ADDRESS_DETAIL        String?                      @db.NVarChar(300)
  SUBMISSION_STATUS     Boolean                      @default(false)
  SUBMISSION_DATE       DateTime?
  SUBMISSION_TARGET_ID  String?                      @db.NVarChar(200)
  REG_DT                DateTime                     @default(now())
  UPT_DT                DateTime                     @updatedAt
  REPRESENTATIVE_ID     String?                      @db.NVarChar(100)
  STORE_ID              String?                      @db.NVarChar(100)
  CONSTRUCTION_POINT_ID String?                      @db.NVarChar(200)
  SUBMISSION_TARGET_NM  String?                      @db.NVarChar(200)
  DEL_YN                String                       @default("N", map: "DF__SD_SURVEY__DEL_Y__4D5F7D71") @db.NVarChar(20)
  DETAIL_INFO           SD_SURVEY_SALES_DETAIL_INFO?
}

model SD_SURVEY_SALES_DETAIL_INFO {
  ID                            Int                        @id @default(autoincrement())
  CONTRACT_CAPACITY             String?                    @db.NVarChar(20)
  RETAIL_COMPANY                String?                    @db.NVarChar(100)
  SUPPLEMENTARY_FACILITIES      String?                    @db.NVarChar(20)
  SUPPLEMENTARY_FACILITIES_ETC  String?                    @db.NVarChar(200)
  INSTALLATION_SYSTEM           String?                    @db.NVarChar(20)
  INSTALLATION_SYSTEM_ETC       String?                    @db.NVarChar(200)
  CONSTRUCTION_YEAR             String?                    @db.NVarChar(200)
  CONSTRUCTION_YEAR_ETC         String?                    @db.NVarChar(200)
  ROOF_MATERIAL                 String?                    @db.NVarChar(20)
  ROOF_MATERIAL_ETC             String?                    @db.NVarChar(200)
  ROOF_SHAPE                    String?                    @db.NVarChar(20)
  ROOF_SHAPE_ETC                String?                    @db.NVarChar(200)
  ROOF_SLOPE                    String?                    @db.NVarChar(5)
  HOUSE_STRUCTURE               String?                    @db.NVarChar(20)
  HOUSE_STRUCTURE_ETC           String?                    @db.NVarChar(200)
  RAFTER_MATERIAL               String?                    @db.NVarChar(20)
  RAFTER_MATERIAL_ETC           String?                    @db.NVarChar(200)
  RAFTER_SIZE                   String?                    @db.NVarChar(20)
  RAFTER_SIZE_ETC               String?                    @db.NVarChar(200)
  RAFTER_PITCH                  String?                    @db.NVarChar(20)
  RAFTER_PITCH_ETC              String?                    @db.NVarChar(200)
  RAFTER_DIRECTION              String?                    @db.NVarChar(20)
  OPEN_FIELD_PLATE_KIND         String?                    @db.NVarChar(20)
  OPEN_FIELD_PLATE_KIND_ETC     String?                    @db.NVarChar(200)
  OPEN_FIELD_PLATE_THICKNESS    String?                    @db.NVarChar(5)
  LEAK_TRACE                    Boolean?                   @default(false)
  WATERPROOF_MATERIAL           String?                    @db.NVarChar(20)
  WATERPROOF_MATERIAL_ETC       String?                    @db.NVarChar(200)
  INSULATION_PRESENCE           String?                    @db.NVarChar(20)
  INSULATION_PRESENCE_ETC       String?                    @db.NVarChar(200)
  STRUCTURE_ORDER               String?                    @db.NVarChar(20)
  STRUCTURE_ORDER_ETC           String?                    @db.NVarChar(200)
  INSTALLATION_AVAILABILITY     String?                    @db.NVarChar(20)
  INSTALLATION_AVAILABILITY_ETC String?                    @db.NVarChar(200)
  MEMO                          String?                    @db.NVarChar(500)
  REG_DT                        DateTime                   @default(now())
  UPT_DT                        DateTime                   @updatedAt
  BASIC_INFO_ID                 Int                        @unique
  BASIC_INFO                    SD_SURVEY_SALES_BASIC_INFO @relation(fields: [BASIC_INFO_ID], references: [ID])
}

model BC_COMM_H {
  HEAD_CD    String      @id(map: "PK_BC_COMM_H") @db.NVarChar(6)
  HEAD_ID    String?     @db.NVarChar(100)
  HEAD_NM    String?     @db.NVarChar(100)
  HEAD_JP    String?     @db.NVarChar(100)
  HEAD_4TH   String?     @db.NVarChar(100)
  REF_CHR1   String?     @db.NVarChar(100)
  REF_CHR2   String?     @db.NVarChar(100)
  REF_CHR3   String?     @db.NVarChar(100)
  REF_CHR4   String?     @db.NVarChar(100)
  REF_CHR5   String?     @db.NVarChar(100)
  REF_NUM1   Decimal?    @db.Decimal(22, 5)
  REF_NUM2   Decimal?    @db.Decimal(22, 5)
  REF_NUM3   Decimal?    @db.Decimal(22, 5)
  REF_NUM4   Decimal?    @db.Decimal(22, 5)
  REF_NUM5   Decimal?    @db.Decimal(22, 5)
  REMARKS    String?     @db.NVarChar(200)
  SAP_YN     String?     @db.NVarChar(1)
  STAT_CD    String?     @db.NVarChar(1)
  DEL_YN     String?     @db.NVarChar(1)
  REG_DT     DateTime?   @db.DateTime
  REG_ID     String?     @db.NVarChar(50)
  UPT_DT     DateTime?   @db.DateTime
  UPT_ID     String?     @db.NVarChar(50)
  QC_COMM_YN String?     @default("N", map: "DF__BC_COMM_H__QC_CO__498EEC8D") @db.NVarChar(1)
  BC_COMM_L  BC_COMM_L[]

  @@index([HEAD_ID], map: "BC_COMM_H_HEAD_ID_IDX")
}

model BC_COMM_L {
  HEAD_CD   String    @db.NVarChar(6)
  CODE      String    @db.NVarChar(50)
  READ_CD   String?   @db.NVarChar(50)
  CODE_NM   String?   @db.NVarChar(100)
  CODE_JP   String?   @db.NVarChar(100)
  CODE_4TH  String?   @db.NVarChar(100)
  REF_CHR1  String?   @db.NVarChar(150)
  REF_CHR2  String?   @db.NVarChar(150)
  REF_CHR3  String?   @db.NVarChar(150)
  REF_CHR4  String?   @db.NVarChar(150)
  REF_CHR5  String?   @db.NVarChar(150)
  REF_NUM1  Decimal?  @db.Decimal(22, 5)
  REF_NUM2  Decimal?  @db.Decimal(22, 5)
  REF_NUM3  Decimal?  @db.Decimal(22, 5)
  REF_NUM4  Decimal?  @db.Decimal(22, 5)
  REF_NUM5  Decimal?  @db.Decimal(22, 5)
  PRIORITY  Decimal?  @db.Decimal(3, 0)
  REF_CNT   String?   @db.NVarChar(5)
  STAT_CD   String?   @db.NVarChar(1)
  DEL_YN    String?   @db.NVarChar(1)
  REG_DT    DateTime? @db.DateTime
  REG_ID    String?   @db.NVarChar(50)
  UPT_DT    DateTime? @db.DateTime
  UPT_ID    String?   @db.NVarChar(50)
  BC_COMM_H BC_COMM_H @relation(fields: [HEAD_CD], references: [HEAD_CD], onUpdate: NoAction, map: "FK_BC_COMM_L")

  @@id([HEAD_CD, CODE], map: "PK_BC_COMM_L")
}

model MS_SUITABLE_ROOF_MATERIAL_GROUP {
  ID               Int       @id @default(autoincrement())
  ROOF_MATL_GRP_CD String    @db.NVarChar(200)
  ROOF_MT_CD       String    @db.NVarChar(200)
  REG_DT           DateTime  @default(now(), map: "DF__MS_SUITAB__creat__4F7CD00D")
  UPT_DT           DateTime?
}

model MS_SUITABLE_DETAIL {
  ID                                Int              @id @default(autoincrement())
  MAIN_ID                           Int
  TRESTLE_MFPC_CD                   String?          @db.NVarChar(200)
  TRESTLE_MANUFACTURER_PRODUCT_NAME String?          @db.NVarChar(200)
  MEMO                              String?          @db.NVarChar(500)
  REG_DT                            DateTime         @default(now(), map: "DF__MS_SUITAB__REG_D__1332DBDC")
  UPT_DT                            DateTime?
  MS_SUITABLE_MAIN                  MS_SUITABLE_MAIN @relation(fields: [MAIN_ID], references: [ID], onUpdate: NoAction, map: "MS_SUITABLE_DETAIL_MS_SUITABLE_MAIN_FK")

  @@index([MAIN_ID, TRESTLE_MANUFACTURER_PRODUCT_NAME], map: "MS_SUITABLE_DETAIL_MAIN_ID_IDX")
}

model MS_SUITABLE_MAIN {
  ID                 Int                  @id @default(autoincrement())
  PRODUCT_NAME       String               @db.NVarChar(200)
  MANU_FT_CD         String?              @db.NVarChar(200)
  ROOF_MT_CD         String?              @db.NVarChar(100)
  ROOF_SH_CD         String?              @db.NVarChar(200)
  REG_DT             DateTime             @default(now(), map: "DF__MS_SUITAB__REG_D__10566F31")
  UPT_DT             DateTime?
  UPT_ID             String?              @db.NVarChar(50)
  DEL_YN             String?              @db.NVarChar(1)
  MS_SUITABLE_DETAIL MS_SUITABLE_DETAIL[]

  @@index([PRODUCT_NAME], map: "MS_SUITABLE_MAIN_PRODUCT_NAME_IDX")
  @@index([ROOF_MT_CD, PRODUCT_NAME], map: "MS_SUITABLE_MAIN_ROOF_MT_CD_IDX")
}

model MS_USR_TRK {
  ID     Int      @id @default(autoincrement())
  OWNER  String   @db.NVarChar(100)
  TYPE   String   @db.NVarChar(50)
  URL    String?  @db.NVarChar(200)
  REG_DT DateTime @default(now())
  DATA   String?  @db.NVarChar(200)
}

model BC_QM_BUILDER {
  COMP_CD             String       @db.NVarChar(4)
  BUILDER_NO          String       @db.NVarChar(50)
  AGENCY_STORE_ID     String       @db.NVarChar(100)
  BUILDER_NM          String       @db.NVarChar(100)
  BUILDER_ID          String?      @db.NVarChar(100)
  ZIP_NO              String?      @db.NVarChar(7)
  PRFT_JP             String?      @db.NVarChar(100)
  MNCP_NM             String?      @db.NVarChar(100)
  ADDR_NM             String?      @db.NVarChar(200)
  ADDR_DTL            String?      @db.NVarChar(200)
  RECEIVER_NM         String?      @db.NVarChar(100)
  RECEIVER_CONTACT_NO String?      @db.NVarChar(100)
  USE_YN              String?      @db.NVarChar(1)
  REG_DT              DateTime?    @db.DateTime
  REG_ID              String?      @db.NVarChar(50)
  UPT_DT              DateTime?    @db.DateTime
  UPT_ID              String?      @db.NVarChar(50)
  BC_QM_USER          BC_QM_USER[]

  @@id([COMP_CD, BUILDER_NO], map: "PK_BC_QM_BUILDER")
}

model BC_QM_TERMS {
  COMP_CD    String       @db.NVarChar(4)
  TERMS_NO   Decimal      @db.Decimal(18, 0)
  VER_NO     String       @db.NVarChar(3)
  VER_SUB_NO String       @db.NVarChar(3)
  OPERTN_DT  DateTime     @db.Date
  TERMS_CTNT String       @db.NVarChar(Max)
  DEL_YN     String?      @db.NVarChar(1)
  REG_DT     DateTime?    @db.DateTime
  REG_ID     String?      @db.NVarChar(50)
  UPT_DT     DateTime?    @db.DateTime
  UPT_ID     String?      @db.NVarChar(50)
  BC_QM_USER BC_QM_USER[]

  @@id([TERMS_NO, COMP_CD], map: "PK_BC_QM_TERMS")
}

model BC_QM_USER {
  COMP_CD            String         @db.NVarChar(4)
  USER_ID            String         @db.NVarChar(50)
  AGENCY_STORE_ID    String         @db.NVarChar(100)
  USER_NM            String         @db.NVarChar(100)
  USER_AUTH_CD       String         @db.NVarChar(10)
  EMAIL              String?        @db.NVarChar(100)
  PSTN_NM            String?        @db.NVarChar(100)
  TEL_NO             String?        @db.NVarChar(100)
  MOBILE_NO          String?        @db.NVarChar(100)
  FAX_NO             String?        @db.NVarChar(100)
  LAST_LOGIN_DT      DateTime?      @db.DateTime
  PWD                String         @db.NVarChar(100)
  PWD_INIT_YN        String?        @default("N", map: "DF__BC_QM_USE__PWD_I__42E1EEFE") @db.NVarChar(1)
  LOGIN_FAIL_CNT     Decimal?       @default(0, map: "DF__BC_QM_USE__LOGIN__43D61337") @db.Decimal(18, 0)
  LAST_LOGIN_FAIL_DT DateTime?      @db.DateTime
  LAST_PWD_UPT_DT    DateTime?      @db.DateTime
  BUILDER_NO         String?        @db.NVarChar(50)
  ZIP_NO             String?        @db.NVarChar(7)
  PRFT_JP            String?        @db.NVarChar(100)
  MNCP_NM            String?        @db.NVarChar(100)
  ADDR_NM            String?        @db.NVarChar(200)
  TERMS_AGREE_YN     String?        @default("N", map: "DF__BC_QM_USE__TERMS__44CA3770") @db.NVarChar(1)
  TERMS_AGREE_DT     DateTime?      @db.DateTime
  AGREE_TERMS_NO     Decimal?       @db.Decimal(18, 0)
  STAT_CD            String?        @db.NVarChar(1)
  DEL_YN             String?        @db.NVarChar(1)
  REG_DT             DateTime?      @db.DateTime
  REG_ID             String?        @db.NVarChar(50)
  UPT_DT             DateTime?      @db.DateTime
  UPT_ID             String?        @db.NVarChar(50)
  USER_NM_KANA       String?        @db.NVarChar(50)
  BC_QM_BUILDER      BC_QM_BUILDER? @relation(fields: [COMP_CD, BUILDER_NO], references: [COMP_CD, BUILDER_NO], onUpdate: NoAction, map: "FK_BC_QM_USER_01")
  BC_QM_TERMS        BC_QM_TERMS?   @relation(fields: [AGREE_TERMS_NO, COMP_CD], references: [TERMS_NO, COMP_CD], onUpdate: NoAction, map: "FK_BC_QM_USER_02")

  @@id([COMP_CD, USER_ID], map: "PK_BC_QM_USER")
}

model IF_PERSON_OFFICE_MAPPING {
  IF_SEQ Decimal   @id(map: "PK_IF_PERSON_OFFICE_MAPPING") @db.Decimal(22, 0)
  SEQ    Int?
  LIFNR  String?   @db.NVarChar(10)
  VKBUR  String?   @db.NVarChar(4)
  IF_DT  DateTime? @db.DateTime
  IF_STS String?   @db.NVarChar(1)
  IF_MSG String?   @db.NVarChar(200)
}

model MS_CUST_AGENCY_STOREID {
  COMP_CD            String    @db.NVarChar(4)
  STORE_ID           String    @db.NVarChar(100)
  AGENCY_STORE_ID    String    @db.NVarChar(100)
  AGENCY_QCAST_NM    String?   @db.NVarChar(100)
  PLAN_REQ_SUBMIT_YN String?   @default("N", map: "DF__MS_CUST_A__PLAN___3B40CD36") @db.NVarChar(1)
  DEL_YN             String?   @default("N", map: "DF__MS_CUST_A__DEL_Y__3C34F16F") @db.NVarChar(1)
  REG_DT             DateTime? @db.DateTime
  REG_ID             String?   @db.NVarChar(50)
  UPT_DT             DateTime? @db.DateTime
  UPT_ID             String?   @db.NVarChar(50)
  EMAIL              String?   @db.NVarChar(100)
  REMARK             String?   @db.NVarChar(Max)
  BDL_TP_CD          String?   @db.NVarChar(10)

  @@id([COMP_CD, AGENCY_STORE_ID], map: "PK_MS_CUST_AGENCY_STOREID")
}

model MS_CUST_H {
  COMP_CD         String            @db.NVarChar(4)
  CUST_CD         String            @db.NVarChar(10)
  ACCOUNT_GR      String?           @db.NVarChar(4)
  CUST_NM         String?           @db.NVarChar(70)
  HAUS_NO         String?           @db.NVarChar(10)
  POST_CD         String?           @db.NVarChar(10)
  CITY_CD         String?           @db.NVarChar(12)
  CITY_NM         String?           @db.NVarChar(40)
  COUNTRY_CD      String?           @db.NVarChar(4)
  REGION_CD       String?           @db.NVarChar(4)
  STREET_NM       String?           @db.NVarChar(60)
  STREET_NM2      String?           @db.NVarChar(60)
  STREET_NM3      String?           @db.NVarChar(60)
  STREET_NM4      String?           @db.NVarChar(60)
  STREET_NM5      String?           @db.NVarChar(60)
  TIME_ZONE       String?           @db.NVarChar(10)
  TRANSP_ZONE     String?           @db.NVarChar(10)
  LANG_CD         String?           @db.NVarChar(2)
  TEL_NO          String?           @db.NVarChar(30)
  TEL_NO_EXT      String?           @db.NVarChar(10)
  MOBILE_NO       String?           @db.NVarChar(30)
  FAX_NO          String?           @db.NVarChar(30)
  FAX_NO_EXT      String?           @db.NVarChar(10)
  EMAIL           String?           @db.NVarChar(100)
  INDUSTRY_CD     String?           @db.NVarChar(4)
  VAT_REG_NO      String?           @db.NVarChar(20)
  LOCAT_NO1       Decimal?          @db.Decimal(7, 0)
  LOCAT_NO2       Decimal?          @db.Decimal(5, 0)
  RESI_CD         String?           @db.NVarChar(4)
  UTIL_CD         String?           @db.NVarChar(4)
  MARK_PF         String?           @db.NVarChar(4)
  INVS_CD         String?           @db.NVarChar(4)
  PRMT_CD         String?           @db.NVarChar(4)
  SVC_PR_CD       String?           @db.NVarChar(4)
  ENG_CNSL_CD     String?           @db.NVarChar(4)
  RECON_ACC_CD    String?           @db.NVarChar(20)
  SORT_KEY        String?           @db.NVarChar(12)
  CASH_MGMT_GR    String?           @db.NVarChar(12)
  INTEREST_IND_CD String?           @db.NVarChar(12)
  TERM_PAY_CD     String?           @db.NVarChar(12)
  PAY_HIST_YN     String?           @db.NVarChar(2)
  DUN_PROC_CD     String?           @db.NVarChar(4)
  DUN_BLOCK_CD    String?           @db.NVarChar(1)
  DUN_LEVEL_CD    Decimal?          @db.Decimal(1, 0)
  POLICY_NO       String?           @db.NVarChar(20)
  INSURED_AMT     Decimal?          @db.Decimal(13, 3)
  VAL_TO_DATE     DateTime?         @db.Date
  DEDUCT_RATE     Decimal?          @db.Decimal(9, 0)
  APPLIED_INSURA  Decimal?          @db.Decimal(13, 3)
  EASY_NO         String?           @db.NVarChar(20)
  APPLY_DATE      DateTime?         @db.Date
  EXPIRE_DATE     DateTime?         @db.Date
  ADD_TXT1        String?           @db.NVarChar(400)
  ADD_TXT2        String?           @db.NVarChar(400)
  REF_PS_ID       String?           @db.NVarChar(20)
  CUST_COMP_CD    String?           @db.NVarChar(4)
  CUST_TEXT       String?           @db.NVarChar(Max)
  CUST_GRADE      String?           @db.NVarChar(2)
  INCOME_TAX_NO   String?           @db.NVarChar(20)
  STAT_CD         String?           @db.NVarChar(2)
  REG_DT          DateTime?         @db.DateTime
  REG_ID          String?           @db.NVarChar(50)
  UPT_DT          DateTime?         @db.DateTime
  UPT_ID          String?           @db.NVarChar(50)
  QSP_ACCOUNT_GR  String?           @db.NVarChar(4)
  BDL_TP_CD       String?           @db.NVarChar(10)
  BDL_SUB_TP_CD   String?           @db.NVarChar(100)
  MS_CUST_STOREID MS_CUST_STOREID[]

  @@id([COMP_CD, CUST_CD], map: "PK_MS_CUST_H")
}

model MS_CUST_PERSON {
  SEQ                Decimal   @db.Decimal(22, 0)
  COMP_CD            String    @db.NVarChar(4)
  CUST_CD            String    @db.NVarChar(10)
  EOS_LOGIN_ID       String?   @db.NVarChar(100)
  EOS_PWD            String?   @db.NVarChar(100)
  NAME               String?   @db.NVarChar(50)
  PSTN_NM            String?   @db.NVarChar(50)
  EMAIL              String?   @db.NVarChar(100)
  TEL_NO             String?   @db.NVarChar(100)
  AUTHORITY          String    @db.NVarChar(1)
  DEL_YN             String?   @default("N", map: "DF__MS_CUST_P__DEL_Y__339FAB6E") @db.NVarChar(1)
  LOGIN_DT           DateTime? @db.DateTime
  PWD_INIT_YN        String?   @db.NVarChar(1)
  LOGIN_FAIL_CNT     Decimal?  @db.Decimal(18, 0)
  REG_DT             DateTime? @db.DateTime
  REG_ID             String?   @db.NVarChar(50)
  UPT_DT             DateTime? @db.DateTime
  UPT_ID             String?   @db.NVarChar(50)
  LOGIN_FAIL_DT      DateTime? @db.DateTime
  PLAN_REQ_AUTH      String?   @default("N", map: "DF__MS_CUST_P__PLAN___3493CFA7") @db.NVarChar(1)
  PRICE_VIEW_STAT_CD String?   @default("S", map: "DF__MS_CUST_P__PRICE__3587F3E0") @db.NVarChar(10)
  SD_SUBMIT_YN       String?   @default("N", map: "DF__MS_CUST_P__SD_SU__367C1819") @db.NVarChar(1)
  STORE_ID           String?   @db.NVarChar(100)
  USER_NM_KANA       String?   @db.NVarChar(50)
  FAX                String?   @db.NVarChar(100)
  PLAN_MAIL_RCV_YN   String?   @default("Y", map: "DF__MS_CUST_P__PLAN___37703C52") @db.NVarChar(1)
  SD_MAIL_RCV_YN     String?   @default("Y", map: "DF__MS_CUST_P__SD_MA__3864608B") @db.NVarChar(1)

  @@id([SEQ, COMP_CD, CUST_CD], map: "PK_MS_CUST_PERSON")
}

model MS_CUST_STOREID {
  COMP_CD                   String    @db.NVarChar(4)
  STORE_ID                  String    @db.NVarChar(100)
  CUST_CD                   String    @db.NVarChar(10)
  REPRESENTATIVE_STORE_YN   String?   @db.NVarChar(1)
  SP_MODULE_PRICE_SEQ       Decimal?  @db.Decimal(20, 0)
  SP_MODULE_PRICE_EXP_FR_DT DateTime? @db.Date
  SP_MODULE_PRICE_EXP_TO_DT DateTime? @db.Date
  SP_BOS_PRICE_SEQ          Decimal?  @db.Decimal(20, 0)
  SP_BOS_PRICE_EXP_FR_DT    DateTime? @db.Date
  SP_BOS_PRICE_EXP_TO_DT    DateTime? @db.Date
  PKG_PRICE_RANK            String?   @default("C", map: "DF__MS_CUST_S__PKG_P__29221CFB") @db.NVarChar(3)
  SP_PKG_PRICE              Decimal?  @db.Decimal(13, 1)
  SP_PKG_PRICE_EXP_FR_DT    DateTime? @db.Date
  SP_PKG_PRICE_EXP_TO_DT    DateTime? @db.Date
  DEL_YN                    String?   @default("N", map: "DF__MS_CUST_S__DEL_Y__2A164134") @db.NVarChar(1)
  REG_DT                    DateTime? @db.DateTime
  REG_ID                    String?   @db.NVarChar(50)
  UPT_DT                    DateTime? @db.DateTime
  UPT_ID                    String?   @db.NVarChar(50)
  MOVE_DT                   DateTime? @db.DateTime
  MOVE_ID                   String?   @db.NVarChar(50)
  STORE_QCAST_NM            String?   @db.NVarChar(100)
  PLAN_REQ_AUTH             String?   @default("N", map: "DF__MS_CUST_S__PLAN___2B0A656D") @db.NVarChar(1)
  PKG_EXCEPT_YN             String?   @default("N", map: "DF__MS_CUST_S__PKG_E__2BFE89A6") @db.NVarChar(1)
  MODULE_PRICE_RANK         String?   @default("C", map: "DF__MS_CUST_S__MODUL__2CF2ADDF") @db.NVarChar(20)
  BOS_PRICE_RANK            String?   @default("A", map: "DF__MS_CUST_S__BOS_P__2DE6D218") @db.NVarChar(20)
  PLAN_REQ_SUBMIT_YN        String?   @default("N", map: "DF__MS_CUST_S__PLAN___2EDAF651") @db.NVarChar(1)
  QSP_SUBAL_YN              String?   @default("N", map: "DF__MS_CUST_S__QSP_S__2FCF1A8A") @db.NVarChar(1)
  MS_CUST_H                 MS_CUST_H @relation(fields: [COMP_CD, CUST_CD], references: [COMP_CD, CUST_CD], onUpdate: NoAction, map: "MS_CUST_STOREID_FK")

  @@id([COMP_CD, STORE_ID], map: "PK_MS_CUST_STOREID")
  @@index([COMP_CD, CUST_CD], map: "IDX_MS_CUST_STOREID_COMP_CD_01")
}

model MS_CUST_STOREID_ADDITNL {
  COMP_CD               String    @db.NVarChar(20)
  STORE_ID              String    @db.NVarChar(100)
  REQ_CUST_CD           String?   @db.NVarChar(10)
  REQ_STORE_QCAST_NM    String?   @db.NVarChar(100)
  STORE_QCAST_NM_KANA   String?   @db.NVarChar(100)
  BIZ_NO                String?   @db.NVarChar(20)
  POST_CD               String?   @db.NVarChar(10)
  ADDR                  String?   @db.NVarChar(255)
  TEL_NO                String?   @db.NVarChar(100)
  FAX                   String?   @db.NVarChar(100)
  APPR_DT               DateTime? @db.DateTime
  APPR_ID               String?   @db.NVarChar(50)
  APPR_STAT_CD          String?   @db.NVarChar(10)
  APPR_REMARKS          String?   @db.NVarChar(300)
  REQ_APPR_DT           DateTime? @db.DateTime
  PAY_TERMS_CD          String?   @db.NVarChar(10)
  FIRST_STORE_ID        String?   @db.NVarChar(100)
  PARENT_STORE_ID       String?   @db.NVarChar(100)
  STORE_LVL             Int?
  KAM_ID                String?   @db.NVarChar(50)
  QT_COMP_NM            String?   @db.NVarChar(100)
  QT_POST_CD            String?   @db.NVarChar(10)
  QT_ADDR               String?   @db.NVarChar(255)
  QT_TEL_NO             String?   @db.NVarChar(100)
  QT_FAX                String?   @db.NVarChar(100)
  QT_E_MAIL             String?   @db.NVarChar(100)
  ORD_DELI_TARGET       String?   @db.NVarChar(100)
  ORD_DELI_COMP_NM      String?   @db.NVarChar(100)
  ORD_DELI_COMP_USER_NM String?   @db.NVarChar(40)
  ORD_DELI_TEL_NO       String?   @db.NVarChar(100)
  ORD_DELI_POST_CD      String?   @db.NVarChar(10)
  ORD_DELI_REMARKS      String?   @db.NVarChar(200)
  GUAR_STORE_NM         String?   @db.NVarChar(100)
  GUAR_STORE_POST_CD    String?   @db.NVarChar(10)
  GUAR_STORE_ADDR       String?   @db.NVarChar(255)
  GUAR_TEL_NO           String?   @db.NVarChar(100)
  NORTH_MODULE_YN       String?   @default("N", map: "DF__MS_CUST_S__NORTH__17036CC0") @db.NVarChar(1)
  DEL_YN                String?   @default("N", map: "DF__MS_CUST_S__DEL_Y__17F790F9") @db.NVarChar(1)
  REG_DT                DateTime? @db.DateTime
  REG_ID                String?   @db.NVarChar(50)
  UPT_DT                DateTime? @db.DateTime
  UPT_ID                String?   @db.NVarChar(50)
  REQ_MODULE_PRICE_RANK String?   @db.NVarChar(20)
  REQ_BOS_PRICE_RANK    String?   @db.NVarChar(20)
  REQ_PKG_PRICE_RANK    String?   @db.NVarChar(3)
  REQ_BDL_TP_CD         String?   @db.NVarChar(10)
  REQ_BDL_SUB_TP_CD     String?   @db.NVarChar(100)
  REMARK                String?   @db.NVarChar(500)
  NORTH_MODULE_UPT_DT   DateTime? @db.DateTime
  NORTH_MODULE_UPT_ID   String?   @db.NVarChar(50)

  @@id([COMP_CD, STORE_ID], map: "PK_MS_CUST_STOREID_ADDITNL")
}
