sqlserver.sql 660 B

123456789101112131415161718192021222324252627
  1. -- 用户表
  2. CREATE TABLE tb_user (
  3. user_id bigint NOT NULL IDENTITY(1,1),
  4. username varchar(50) NOT NULL,
  5. mobile varchar(20) NOT NULL,
  6. password varchar(64),
  7. create_time datetime,
  8. PRIMARY KEY (user_id),
  9. UNIQUE (username)
  10. );
  11. -- 用户Token表
  12. CREATE TABLE tb_token (
  13. user_id bigint NOT NULL,
  14. token varchar(100) NOT NULL,
  15. expire_time datetime,
  16. update_time datetime,
  17. PRIMARY KEY (user_id),
  18. UNIQUE (token)
  19. );
  20. -- 账号:13612345678 密码:admin
  21. INSERT INTO tb_user (username, mobile, password, create_time) VALUES ('mark', '13612345678', '8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918', '2017-03-23 22:37:41');