whepi.sql 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. create user whepi_test@'%' identified by '123456';
  3. flush privileges;
  4. CREATE DATABASE IF NOT EXISTS whepi_test default charset utf8 COLLATE utf8_general_ci;
  5. grant all privileges on whepi_test.* to whepi_test;
  6. flush privileges;
  7. */
  8. drop table if exists tb_user
  9. ;
  10. create table tb_user
  11. (
  12. user_id BIGINT not null comment '用户编号',
  13. login_name VARCHAR(50) not null default '' comment '登录账户',
  14. login_pwd VARCHAR(50) not null default '123456' comment '登录密码',
  15. phone VARCHAR(11) not null default '' comment '用户手机号',
  16. user_type VARCHAR(1) not null comment '角色 A=管理员 / C=收银员 / S=销售',
  17. staff_name VARCHAR(20) not null comment '用户姓名',
  18. place_id BIGINT not null default 0 comment '场地id',
  19. version CHAR(19) not null comment 'token版本',
  20. login_count INTEGER not null default '0' comment '登录次数',
  21. last_login_time TIMESTAMP NOT NULL COMMENT '最后登录时间',
  22. be_active CHAR(1) not null default 'Y' comment '是否活动 Y=活动/N=禁用/D=删除',
  23. create_at TIMESTAMP NOT NULL COMMENT '建立时间',
  24. update_at TIMESTAMP NOT NULL COMMENT '更新日期',
  25. primary key ( user_id )
  26. )
  27. ENGINE=InnoDB
  28. DEFAULT CHARSET=utf8
  29. COMMENT = '用户资料'
  30. ;