ALTER TABLE `authority_info` CHANGE COLUMN `name` `name` VARCHAR (100) NOT NULL COMMENT '权限名称';

DROP TABLE IF EXISTS `category_organization`;
CREATE TABLE `category_organization`
(
    `id`                     BIGINT(20) NOT NULL COMMENT 'ID',
    `name`                   VARCHAR(50)    NOT NULL COMMENT '公司名称',
    `social_code`            VARCHAR(50)    NOT NULL COMMENT '统一社会信用编码',
    `business_license`       VARCHAR(100)   NOT NULL COMMENT '公司的营业执照',
    `legal_person_name`      VARCHAR(32)    NOT NULL COMMENT '法人姓名',
    `legal_person_id_card_a` VARCHAR(100)   NOT NULL COMMENT '法人身份证正面',
    `legal_person_id_card_b` VARCHAR(100)   NOT NULL COMMENT '法人身份证反面',
    `contacts`               VARCHAR(32)    NOT NULL COMMENT '联系人',
    `contact_number`         VARCHAR(32)    NOT NULL COMMENT '联系电话',
    `contact_address`        VARCHAR(100)   NOT NULL COMMENT '联系地址',
    `lng`                    DECIMAL(20, 6) NOT NULL DEFAULT '0.000000' COMMENT '经度（坐标）',
    `lat`                    DECIMAL(20, 6) NOT NULL DEFAULT '0.000000' COMMENT '纬度（坐标）',
    `remark`                 VARCHAR(200) NULL DEFAULT NULL COMMENT '公司备注说明',
    `created_time`           DATETIME NULL DEFAULT NULL COMMENT '创建时间',
    `created_by`             BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
    `updated_time`           DATETIME NULL DEFAULT NULL COMMENT '修改时间',
    `updated_by`             BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
    PRIMARY KEY (`id`)
) COMMENT ='机构目录管理' ENGINE = InnoDB;

REPLACE
INTO `authority_info` (`id`, `parent_id`, `name`, `remark`)
VALUES (1900, 0, 'category.organization', '机构目录管理'),
       (1901, 1900, 'category.organization.find', '查询'),
       (1902, 1900, 'category.organization.add', '添加'),
       (1903, 1900, 'category.organization.edit', '修改'),
       (1904, 1900, 'category.organization.delete', '删除');


DROP TABLE IF EXISTS `category_occupation`;
CREATE TABLE `category_occupation`
(
    `id`           BIGINT(20) NOT NULL COMMENT 'ID',
    `name`         VARCHAR(50) NOT NULL COMMENT '岗位目录名称',
    `sort_number`  INT(11) NOT NULL COMMENT '排序ID',
    `remark`       TEXT NULL DEFAULT NULL COMMENT '备注说明',
    `created_time` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
    `created_by`   BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
    `updated_time` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
    `updated_by`   BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
    PRIMARY KEY (`id`)
) COMMENT ='文旅岗位目录管理' ENGINE = InnoDB;

REPLACE
INTO `authority_info` (`id`, `parent_id`, `name`, `remark`)
VALUES (2000, 0, 'category.occupation', '文旅岗位目录管理'),
       (2001, 2000, 'category.occupation.find', '查询'),
       (2002, 2000, 'category.occupation.add', '添加'),
       (2003, 2000, 'category.occupation.edit', '修改'),
       (2004, 2000, 'category.occupation.delete', '删除');


DROP TABLE IF EXISTS `category_material`;
CREATE TABLE `category_material`
(
    `id`           BIGINT(20) NOT NULL COMMENT 'ID',
    `name`         VARCHAR(50) NOT NULL COMMENT '物务资源目录名称',
    `sort_number`  INT(11) NOT NULL COMMENT '排序ID',
    `remark`       TEXT NULL DEFAULT NULL COMMENT '备注说明',
    `created_time` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
    `created_by`   BIGINT(20) NULL DEFAULT NULL COMMENT '创建人',
    `updated_time` DATETIME NULL DEFAULT NULL COMMENT '修改时间',
    `updated_by`   BIGINT(20) NULL DEFAULT NULL COMMENT '修改人',
    PRIMARY KEY (`id`)
) COMMENT ='物务资源目录管理' ENGINE = InnoDB;

REPLACE
INTO `authority_info` (`id`, `parent_id`, `name`, `remark`)
VALUES (2100, 0, 'category.material', '物务资源目录管理'),
       (2101, 2100, 'category.material.find', '查询'),
       (2102, 2100, 'category.material.add', '添加'),
       (2103, 2100, 'category.material.edit', '修改'),
       (2104, 2100, 'category.material.delete', '删除');
