敏捷工具
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.0 KiB

2 years ago
  1. drop table t_coffee if exists;
  2. drop table t_order if exists;
  3. drop table t_order_coffee if exists;
  4. create table t_coffee (
  5. id bigint auto_increment,
  6. create_time timestamp,
  7. update_time timestamp,
  8. name varchar(255),
  9. price bigint,
  10. primary key (id)
  11. );
  12. create table t_order (
  13. id bigint auto_increment,
  14. create_time timestamp,
  15. update_time timestamp,
  16. customer varchar(255),
  17. state integer not null,
  18. primary key (id)
  19. );
  20. create table t_order_coffee (
  21. coffee_order_id bigint not null,
  22. items_id bigint not null
  23. );
  24. insert into t_coffee (name, price, create_time, update_time) values ('espresso', 2000, now(), now());
  25. insert into t_coffee (name, price, create_time, update_time) values ('latte', 2500, now(), now());
  26. insert into t_coffee (name, price, create_time, update_time) values ('capuccino', 2500, now(), now());
  27. insert into t_coffee (name, price, create_time, update_time) values ('mocha', 3000, now(), now());
  28. insert into t_coffee (name, price, create_time, update_time) values ('macchiato', 3000, now(), now());