TicketReply.js 632 B

123456789101112131415161718192021222324252627282930
  1. import { User } from 'src/models/User.js'
  2. import { Collection, Model } from 'js-abstract-model'
  3. class TicketReply extends Model {
  4. constructor (data) {
  5. super(data, [
  6. { key: 'id' },
  7. { key: 'body' },
  8. { key: 'ticket' },
  9. { key: 'read' },
  10. { key: 'creation_time' },
  11. { key: 'last_modification_time' },
  12. { key: 'is_active' },
  13. { key: 'is_deleted' },
  14. { key: 'creator' },
  15. {
  16. key: 'creator_info',
  17. relatedModel: User
  18. }
  19. ])
  20. }
  21. }
  22. class TicketReplyList extends Collection {
  23. model () {
  24. return TicketReply
  25. }
  26. }
  27. export { TicketReply, TicketReplyList }