xg_dorm_manager.sql 2.1 KB

1234567891011121314151617181920212223242526272829
  1. -- ----------------------------
  2. -- 宿舍管理员表
  3. -- ----------------------------
  4. drop table if exists xg_dorm_manager;
  5. create table xg_dorm_manager (
  6. id bigint(20) not null comment '主键',
  7. name varchar(100) not null comment '管理员姓名',
  8. phone varchar(11) not null comment '手机号码',
  9. sex int(1) default 0 comment '性别(0男 1女 2未知)',
  10. manager_type int(1) default 0 comment '管理类型(0全校 1校区 2宿舍区 3宿舍楼)',
  11. scope varchar(100) comment '管理范围(校区/宿舍区/宿舍楼)',
  12. user_id bigint(20) comment '关联用户ID',
  13. remark varchar(500) comment '备注',
  14. create_by bigint(20) comment '创建者',
  15. create_time datetime comment '创建时间',
  16. update_by bigint(20) comment '更新者',
  17. update_time datetime comment '更新时间',
  18. deleted char(1) default '0' comment '删除标志(0代表存在 2代表删除)',
  19. tenant_id varchar(20) default '000000' comment '租户编号',
  20. primary key (id)
  21. ) engine=innodb comment = '宿舍管理员信息表';
  22. -- ----------------------------
  23. -- 初始数据
  24. -- ----------------------------
  25. INSERT INTO xg_dorm_manager(id, name, phone, sex, manager_type, scope, user_id, remark, create_by, create_time, update_by, update_time, deleted, tenant_id)
  26. VALUES (1, '张三', '13800000001', 0, 0, null, 2, '全校主管', 1, sysdate(), 1, sysdate(), '0', '000000');
  27. INSERT INTO xg_dorm_manager(id, name, phone, sex, manager_type, scope, user_id, remark, create_by, create_time, update_by, update_time, deleted, tenant_id)
  28. VALUES (2, '李四', '13800000002', 1, 0, null, 3, '全校副主管', 1, sysdate(), 1, sysdate(), '0', '000000');