3
1

index.ts 876 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import Block from './block'
  2. import Channel from './channel'
  3. import Council from './council'
  4. import Era from './era'
  5. import Event from './event'
  6. import Proposal from './proposal'
  7. import Member from './member'
  8. import Category from './category'
  9. import Thread from './thread'
  10. import Post from './post'
  11. Era.hasMany(Block)
  12. Block.belongsTo(Era)
  13. Block.belongsTo(Member, { as: 'author' })
  14. Block.hasMany(Event)
  15. Council.hasMany(Member, { as: 'seat' })
  16. Channel.belongsTo(Member, { as: 'owner' })
  17. Category.hasMany(Thread)
  18. Category.belongsTo(Member, { as: 'moderator' })
  19. Thread.belongsTo(Category)
  20. Thread.belongsTo(Member, { as: 'author' })
  21. Thread.belongsTo(Member, { as: 'moderator' })
  22. Thread.hasMany(Post)
  23. Post.belongsTo(Thread)
  24. Post.belongsTo(Member, { as: 'author' })
  25. export {
  26. Block,
  27. Channel,
  28. Council,
  29. Era,
  30. Event,
  31. Member,
  32. Proposal,
  33. Category,
  34. Thread,
  35. Post,
  36. }