-- ============================================
-- 무료용 대상자 테이블 (P2-13, P2-14)
-- ============================================

CREATE TABLE IF NOT EXISTS `free_recipient` (
  `fr_idx`       INT UNSIGNED NOT NULL AUTO_INCREMENT,
  `fr_lg_idx`    INT UNSIGNED NOT NULL COMMENT '지자체 FK',
  `fr_type_code` VARCHAR(20) NOT NULL COMMENT '무상지급구분 code_detail(H)',
  `fr_name`      VARCHAR(100) NOT NULL DEFAULT '' COMMENT '대상자/기관명',
  `fr_phone`     VARCHAR(20) NOT NULL DEFAULT '',
  `fr_addr`      VARCHAR(255) NOT NULL DEFAULT '',
  `fr_dong_code` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '동코드 code_detail(D)',
  `fr_note`      VARCHAR(255) NOT NULL DEFAULT '' COMMENT '비고',
  `fr_end_date`  DATE NULL DEFAULT NULL COMMENT '종료일자',
  `fr_state`     TINYINT UNSIGNED NOT NULL DEFAULT 1 COMMENT '1=정상, 0=삭제',
  `fr_regdate`   DATETIME NOT NULL,
  PRIMARY KEY (`fr_idx`),
  KEY `idx_fr_lg_idx` (`fr_lg_idx`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='무료용 대상자';
