-- 学生缴费信息表
DROP TABLE IF EXISTS pb_V_XSXXSFYTB;
CREATE TABLE `pb_V_XSXXSFYTB` (
  `pkfeeobj` VARCHAR(40) DEFAULT NULL,
  `Studentcode` VARCHAR(30) DEFAULT NULL,
  `feeobjname` VARCHAR(60) DEFAULT NULL,
  `classname` VARCHAR(60) DEFAULT NULL,
  `classcode` VARCHAR(30) DEFAULT NULL,
  `specname` VARCHAR(60) DEFAULT NULL,
  `speccode` VARCHAR(30) DEFAULT NULL,
  `deptname` VARCHAR(60) DEFAULT NULL,
  `deptcode` VARCHAR(30) DEFAULT NULL,
  `enteryear` VARCHAR(10) DEFAULT NULL,
  `leaveyear` VARCHAR(10) DEFAULT NULL,
  `personalid` VARCHAR(20) DEFAULT NULL,
  `userdef1` VARCHAR(60) DEFAULT NULL,
  `recruiters` VARCHAR(60) DEFAULT NULL,
  `userdef2` VARCHAR(60) DEFAULT NULL,
  `admissions` VARCHAR(60) DEFAULT NULL,
  `address` VARCHAR(60) DEFAULT NULL,
  `telephone` VARCHAR(30) DEFAULT NULL,
  `nationality` VARCHAR(30) DEFAULT NULL,
  `property` VARCHAR(20) DEFAULT NULL,
  `remarks` VARCHAR(255) DEFAULT NULL,
  `graduations` VARCHAR(60) DEFAULT NULL,
  `state` VARCHAR(255) DEFAULT NULL,
  `sex` VARCHAR(2) DEFAULT NULL,
  `standardar` DECIMAL(18,2) DEFAULT NULL,
  `factar` DECIMAL(18,2) DEFAULT NULL,
  `adjustmny` DECIMAL(18,2) DEFAULT NULL,
  `jmje` DECIMAL(18,2) DEFAULT NULL,
  `arrearagemny` DECIMAL(18,2) DEFAULT NULL,
  `factrecarmny` DECIMAL(18,2) DEFAULT NULL,
  `qfje` DECIMAL(18,2) DEFAULT NULL,
  `onlinepaymny` DECIMAL(18,2) DEFAULT NULL,
  `hjje` DECIMAL(38,2) DEFAULT NULL,
  `dkje` DECIMAL(38,2) DEFAULT NULL,
  `refundmny` DECIMAL(18,2) DEFAULT NULL,
  `feeitemcode` VARCHAR(30) DEFAULT NULL,
  `feeitemname` VARCHAR(60) DEFAULT NULL,
  `beltcode` VARCHAR(30) DEFAULT NULL,
  `beltname` VARCHAR(60) DEFAULT NULL,
  `ratetypename` VARCHAR(60) DEFAULT NULL,
  `resourcename` VARCHAR(30) DEFAULT NULL,
  `quartername` VARCHAR(60) DEFAULT NULL,
  `pksfxxytb` VARCHAR(60) DEFAULT NULL
) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

-- 原本考核项目改为考核细则表
ALTER TABLE `tl`.`base_student_assessment_project` COMMENT='学生考核细则';


-- 增加考核项目表
DROP TABLE IF EXISTS base_student_assessment_item;
CREATE TABLE `base_student_assessment_item` (
  `id` BIGINT NOT NULL,
  `create_user_id` BIGINT DEFAULT NULL,
  `create_date` DATETIME(3) DEFAULT NULL,
  `modify_user_id` BIGINT DEFAULT NULL,
  `modify_date` DATETIME(3) DEFAULT NULL,
  `delete_mark` INT DEFAULT NULL,
  `enabled_mark` INT DEFAULT NULL,
  `name` VARCHAR(100) DEFAULT NULL COMMENT '项目名称',
  `base_student_assessment_category_id` BIGINT DEFAULT NULL COMMENT '学生考核类别(base_student_assessment_category)',
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='考核项目表';

-- 教师标签关系表
DROP TABLE IF EXISTS base_teacher_label;
CREATE TABLE `base_teacher_label` (
  `label_id` BIGINT DEFAULT NULL COMMENT '标签表id',
  `user_id` BIGINT DEFAULT NULL COMMENT '教师userId'
) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='教师标签关系表';

INSERT INTO base_label(id,create_user_id,create_date,delete_mark,enabled_mark,sort_code,NAME,category)
VALUE(1747972707132174359,1000000000000000000,NOW(),0,1,8,'公共基础部','base_course_subject');

-- -----------------------------------------------------------
-- 台账配置表
-- -----------------------------------------------------------
DROP TABLE IF EXISTS ledger_config;
CREATE TABLE `ledger_config` (
  `id` BIGINT NOT NULL,
  `create_user_id` BIGINT DEFAULT NULL,
  `create_date` DATETIME(3) DEFAULT NULL,
  `modify_user_id` BIGINT DEFAULT NULL,
  `modify_date` DATETIME(3) DEFAULT NULL,
  `delete_mark` INT DEFAULT NULL,
  `enabled_mark` INT DEFAULT NULL,
  `name` VARCHAR(100) DEFAULT NULL COMMENT '台账名称',
  `api_url` VARCHAR(100) DEFAULT NULL COMMENT 'magicapi接口地址',
  `config_json` LONGTEXT DEFAULT NULL COMMENT '台账配置信息',
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='台账配置表';

-- -----------------------------------------------------------
-- 台账发布表
-- -----------------------------------------------------------
DROP TABLE IF EXISTS ledger_config_release;
CREATE TABLE `ledger_config_release` (
  `id` BIGINT NOT NULL,
  `create_user_id` BIGINT DEFAULT NULL,
  `create_date` DATETIME(3) DEFAULT NULL,
  `modify_user_id` BIGINT DEFAULT NULL,
  `modify_date` DATETIME(3) DEFAULT NULL,
  `delete_mark` INT DEFAULT NULL,
  `enabled_mark` INT DEFAULT NULL,
  `ledger_config_id` BIGINT DEFAULT NULL COMMENT '台账配置(ledger_config)',
  `menu_id` BIGINT DEFAULT NULL COMMENT '菜单信息',
  `config_json` LONGTEXT DEFAULT NULL COMMENT '台账配置信息',
  `remark` VARCHAR(250) DEFAULT NULL COMMENT '备注信息',
  `sort_code` INT DEFAULT NULL COMMENT '序号',
  PRIMARY KEY (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='台账发布表';

