카뱅과제

테이블 (19)

account_subject (계정과목)

  • id (계정과목아이디) — BIGINT — 기본 키 — NOT NULL
  • accunt_code (계정과목코드) — string
  • account_name (계정과목명) — string
  • account_type (계정타입) — string
  • description (설명) — string
  • status (상태) — string
  • created_at (생성일자) — datetime
  • update_at (수정일자) — datetime

adjustment (조정)

  • id (조정아이디) — BIGINT — 기본 키 — NOT NULL
  • reason (조정사유) — string
  • type (조정타입) — string
  • amount (조정금액) — number
  • settlement_id (정산아이디) — BIGINT — 외래 키 → settlement.id — NOT NULL
  • adjust_at (조정일자) — datetime

bond (채권)

  • id (채권아이디) — BIGINT — 기본 키 — NOT NULL
  • issuer_id (발행기관아이디) — BIGINT — 외래 키 → bond_issuer.id — NOT NULL
  • manager_id (채권등록관리자아이디) — BIGINT — 외래 키 → bond_manager.id — NOT NULL
  • bond_name (채권명) — string
  • bond_code (채권코드) — string
  • bond_type (채권유형) — string
  • face_value (액면가) — number
  • interest_rate (이자율) — number
  • issue_date (발행일) — datetime
  • expire_date (만기일) — datetime
  • currency (통화) — string
  • credit_rating (신용등급) — string
  • issue_amount (발행금액) — number
  • status (상태) — string
  • created_at (생성일자) — datetime
  • update_at (수정일자) — datetime

bond_adjust_history (채권변경이력)

  • id (변경이력아이디) — BIGINT — 기본 키 — NOT NULL
  • manager_id (관리자아이디) — BIGINT — 외래 키 → bond_manager.id — NOT NULL
  • type (변경유형) — string
  • reason (변경사유) — string
  • field_name (변경필드명) — string
  • prev_value (이전값) — string
  • after_value (이후값) — string
  • status (상태) — string
  • created_at (생성일자) — datetime
  • update_at (수정일자) — datetime
  • bond_id (채권아이디) — BIGINT — 외래 키 → bond.id — NOT NULL

bond_issuer (채권발행기관)

  • id (발행기관아이디) — BIGINT — 기본 키 — NOT NULL
  • issuer_name (발행기관명) — string
  • issuer_type (발행기관유형) — string
  • credit_rating (신용등급) — string
  • country_code (국가코드) — string
  • industry_code (업종코드) — string
  • status (상태) — string
  • created_at (생성일자) — datetime
  • update_at (수정일자) — datetime

bond_manager (채권관리자)

  • id (관리자아이디) — BIGINT — 기본 키 — NOT NULL
  • manager_name (관리자명) — string
  • department (부서) — string
  • position (직급) — string
  • email (이메일) — string
  • phone (연락처) — string
  • role (권한) — string
  • status (상태) — string
  • created_at (생성일자) — datetime
  • update_at (수정일자) — datetime

bond_portfolio (채권포트폴리오)

  • id (채권포트폴리오아이디) — BIGINT — 기본 키 — NOT NULL
  • weight (비중) — number
  • amount (배정금액) — number
  • created_at (생성일자) — datetime
  • update_at (수정일자) — datetime
  • portfolio_id (포트폴리오아이디) — BIGINT — 외래 키 → portfolio.id — NOT NULL
  • bond_id (채권아이디) — BIGINT — 외래 키 → bond.id — NOT NULL

extinction (소멸)

  • id (소멸아이디) — BIGINT — 기본 키 — NOT NULL
  • type (소멸유형) — string
  • reason (소멸사유) — string
  • extinction_date (소멸일) — string
  • amount (소멸금액) — number
  • legal_basis (법적 근거) — number
  • approve_status (승인상태) — datetime
  • approve_date (승인일) — datetime
  • status (상태) — string
  • created_at (생성일자) — datetime
  • update_at (수정일자) — datetime
  • bond_manager_id (관리자아이디) — BIGINT — 외래 키 → bond_manager.id — NOT NULL
  • bond_id (채권아이디) — BIGINT — 외래 키 → bond.id — NOT NULL

global_ledger (총거래원장)

  • id (총거래원장아이디) — BIGINT — 기본 키 — NOT NULL
  • transaction_type (거래유형) — string
  • debit_amount (차변금액) — string
  • credit_amount (대변금액) — string
  • description (적요) — string
  • status (상태) — string
  • created_at (생성일자) — datetime
  • transaction_date (거래일자) — datetime
  • update_at (수정일자) — datetime
  • bond_id (채권아이디) — BIGINT — 외래 키 → bond.id — NOT NULL
  • account_id (계정코드아이디) — BIGINT — 외래 키 → account_subject.id — NOT NULL

interest (이자)

  • id (이자아이디) — BIGINT — 기본 키 — NOT NULL
  • interest_rate (이자율) — number
  • rate_type (이자타입) — string
  • calc_method (산출수익방식) — string
  • start_date (시작일) — datetime
  • end_date (종료일) — datetime
  • payment_date (지급일) — datetime
  • interest_amount (이자금액) — number
  • payment_status (지급상태) — string
  • interest_basis (이자기준) — string
  • created_at (생성일자) — datetime
  • update_at (수정일자) — datetime
  • bond_id (채권아이디) — BIGINT — 외래 키 → bond.id — NOT NULL
  • account_code_id (계정코드아이디) — BIGINT — 외래 키 → account_subject.id — NOT NULL

interest_adjustment_history (이자변경이력)

  • id (변경이력아이디) — BIGINT — 기본 키 — NOT NULL
  • interest_rate (수정사유) — number
  • rate_type (이자율) — string
  • created_at (생성일자) — datetime
  • update_at (수정일자) — datetime
  • interest_id (이자아이디) — BIGINT — 외래 키 → interest.id — NOT NULL

investment (투자)

  • id (투자아이디) — BIGINT — 기본 키 — NOT NULL
  • investment_amount (투자금액) — number
  • investment_quantity (수량) — number
  • unit_price (단가) — number
  • investment_date (투자일) — datetime
  • tx_type (거래유형) — string
  • current_value (현재가치) — number
  • unrealized_gain_loss (미실현손익) — number
  • status (상태) — string
  • created_at (생성일자) — datetime
  • update_at (수정일자) — datetime
  • portfolio_id (포트폴리오아이디) — BIGINT — 외래 키 → portfolio.id — NOT NULL
  • bond_id (채권아이디) — BIGINT — 외래 키 → bond.id — NOT NULL
  • account_code_id (계정코드아이디) — BIGINT — 외래 키 → account_subject.id — NOT NULL

overdue (연체)

  • id (연체아이디) — BIGINT — 기본 키 — NOT NULL
  • start_date (연체시작일) — string
  • amount (연체금액) — string
  • penalty_amount (연체료) — number
  • reason (사유) — number
  • resolution_date (해결예정일) — datetime
  • status (상태) — string
  • created_at (생성일자) — datetime
  • update_at (수정일자) — datetime
  • bond_manager_id (관리자아이디) — BIGINT — 외래 키 → bond_manager.id — NOT NULL
  • bond_id (채권아이디) — BIGINT — 외래 키 → bond.id — NOT NULL

portfolio (포트폴리오)

  • id (포트폴리오아이디) — BIGINT — 기본 키 — NOT NULL
  • manager_id (관리자아이디) — BIGINT — 외래 키 → bond_manager.id — NOT NULL
  • portfolio_name (포트폴리오명) — string
  • portfolio_type (포트폴리오타입) — string
  • total_value (총자산가치) — number
  • investment_strategy (투자전략) — string
  • status (상태) — string
  • created_at (생성일자) — datetime
  • update_at (수정일자) — datetime

reconciliation (대사)

  • id (대사아이디) — BIGINT — 기본 키 — NOT NULL
  • reconciliation_system (대사시스템) — string
  • result (대사결과) — string
  • checked_at (대사일자) — datetime
  • settlement_id (정산아이디) — BIGINT — 외래 키 → settlement.id — NOT NULL
  • external_amount (외부사전달금액) — number
  • external_code (외부사응답코드) — string
  • external_message (외부사응답메시지) — string

repayment (상환)

  • id (상환아이디) — BIGINT — 기본 키 — NOT NULL
  • amount (상환금액) — string
  • date (상환일) — string
  • type (상환유형) — string
  • method (상환방법) — number
  • origin_amount (원금상환액) — number
  • interest_amount (이자상환액) — datetime
  • status (상환상태) — datetime
  • created_at (생성일자) — datetime
  • update_at (수정일자) — datetime
  • bond_manager_id (관리자아이디) — BIGINT — 외래 키 → bond_manager.id — NOT NULL
  • bond_id (채권아이디) — BIGINT — 외래 키 → bond.id — NOT NULL

report_history (보고이력)

  • id (보고이력아이디) — BIGINT — 기본 키 — NOT NULL
  • type (보고타입) — string
  • report_at (보고일자) — string
  • content (보고내용) — string
  • settlement_id (정산아이디) — BIGINT — 외래 키 → settlement.id — NOT NULL
  • reporter (보고자명) — string

settlement (정산)

  • id (정산아이디) — BIGINT — 기본 키 — NOT NULL
  • date (정산일자) — datetime
  • amount (정산금액) — string
  • status (상태) — string
  • portfolio_id (포트폴리오아이디) — BIGINT — 외래 키 → portfolio.id — NOT NULL
  • bond_id (채권아이디) — BIGINT — 외래 키 → bond.id — NOT NULL

settlement_final (정산확정)

  • id (정산확정관리아이디) — BIGINT — 기본 키 — NOT NULL
  • date (확정일자) — datetime
  • amount (확정금액) — string
  • description (설명) — string
  • id (정산아이디) — BIGINT — 외래 키 → settlement.id — NOT NULL