-- ============================================
-- 판매 대행소 테이블 (P2-07, P2-08)
-- ============================================

CREATE TABLE IF NOT EXISTS `sales_agency` (
  `sa_idx`       INT UNSIGNED NOT NULL AUTO_INCREMENT,
  `sa_lg_idx`    INT UNSIGNED NOT NULL COMMENT '지자체 FK',
  `sa_name`      VARCHAR(100) NOT NULL DEFAULT '' COMMENT '대행소명',
  `sa_biz_no`    VARCHAR(20) NOT NULL DEFAULT '' COMMENT '사업자번호',
  `sa_rep_name`  VARCHAR(50) NOT NULL DEFAULT '' COMMENT '대표자명',
  `sa_tel`       VARCHAR(20) NOT NULL DEFAULT '' COMMENT '전화번호',
  `sa_addr`      VARCHAR(255) NOT NULL DEFAULT '' COMMENT '주소',
  `sa_state`     TINYINT UNSIGNED NOT NULL DEFAULT 1 COMMENT '1=정상, 0=미사용',
  `sa_regdate`   DATETIME NOT NULL,
  PRIMARY KEY (`sa_idx`),
  KEY `idx_sa_lg_idx` (`sa_lg_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='판매 대행소';
