CREATE DATABASE IF NOT EXISTS zgwl_end DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

USE zgwl_end;

DROP TABLE IF EXISTS BIZ_STUDENT;
CREATE TABLE BIZ_STUDENT (
    id BIGINT NOT NULL COMMENT '主键ID',
    student_no VARCHAR(64) NOT NULL COMMENT '学号',
    student_name VARCHAR(64) NOT NULL COMMENT '姓名',
    gender VARCHAR(16) NOT NULL COMMENT '性别',
    age INT NOT NULL COMMENT '年龄',
    phone VARCHAR(32) DEFAULT NULL COMMENT '手机号',
    address VARCHAR(255) DEFAULT NULL COMMENT '地址',
    create_dt DATETIME DEFAULT NULL COMMENT '创建时间',
    update_dt DATETIME DEFAULT NULL COMMENT '更新时间',
    create_by VARCHAR(64) DEFAULT NULL COMMENT '创建人',
    update_by VARCHAR(64) DEFAULT NULL COMMENT '更新人',
    PRIMARY KEY (id),
    UNIQUE KEY uk_student_no (student_no)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='学生表';

INSERT INTO BIZ_STUDENT (id, student_no, student_name, gender, age, phone, address, create_dt, update_dt, create_by, update_by) VALUES
(1925800000000000001, 'S2024001', '张三', '男', 20, '13800001111', '宁波市鄞州区', NOW(), NOW(), 'system', 'system'),
(1925800000000000002, 'S2024002', '李四', '女', 21, '13800002222', '宁波市北仑区', NOW(), NOW(), 'system', 'system'),
(1925800000000000003, 'S2024003', '王五', '男', 22, '13800003333', '宁波市镇海区', NOW(), NOW(), 'system', 'system');
