Message.js 437 B

123456789101112131415161718192021222324252627282930
  1. export default class Message {
  2. constructor(id, from, to, time) {
  3. this.id = id;
  4. this.from = from;
  5. this.to = to;
  6. this.time = time;
  7. }
  8. }
  9. /***
  10. 文本消息id from to data time
  11. 图片消息id from to path time
  12. 消息表:
  13. CREATE TABLE IF NOT EXISTS message(
  14. id INTEGER PRIMARY KEY,
  15. from VARCHAR,
  16. to VARCHAR,
  17. content TEXT,
  18. img VARCHAR,
  19. type VARCHAR,
  20. time INTEGER
  21. )
  22. id from to content img type time
  23. **/