-- ============================================
-- 담당자 테이블 (P2-09, P2-10)
-- ============================================

CREATE TABLE IF NOT EXISTS `manager` (
  `mg_idx`           INT UNSIGNED NOT NULL AUTO_INCREMENT,
  `mg_lg_idx`        INT UNSIGNED NOT NULL COMMENT '지자체 FK',
  `mg_name`          VARCHAR(50) NOT NULL DEFAULT '' COMMENT '담당자명',
  `mg_dept_code`     VARCHAR(20) NOT NULL DEFAULT '' COMMENT '소속 code_detail(S)',
  `mg_position_code` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '직위 code_detail(T)',
  `mg_tel`           VARCHAR(20) NOT NULL DEFAULT '' COMMENT '전화번호',
  `mg_phone`         VARCHAR(20) NOT NULL DEFAULT '' COMMENT '휴대전화',
  `mg_email`         VARCHAR(100) NOT NULL DEFAULT '' COMMENT '이메일',
  `mg_state`         TINYINT UNSIGNED NOT NULL DEFAULT 1,
  `mg_regdate`       DATETIME NOT NULL,
  PRIMARY KEY (`mg_idx`),
  KEY `idx_mg_lg_idx` (`mg_lg_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='담당자';
