index.js 4.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. "use strict";
  2. exports.__esModule = true;
  3. exports.Moderation = exports.Post = exports.Thread = exports.Category = exports.ProposalVote = exports.ProposalPost = exports.Proposal = exports.Member = exports.Event = exports.Era = exports.ConsulStake = exports.Consul = exports.Council = exports.Channel = exports.Block = exports.Balance = exports.Account = void 0;
  4. var account_1 = require("./account");
  5. exports.Account = account_1["default"];
  6. var balance_1 = require("./balance");
  7. exports.Balance = balance_1["default"];
  8. var block_1 = require("./block");
  9. exports.Block = block_1["default"];
  10. var channel_1 = require("./channel");
  11. exports.Channel = channel_1["default"];
  12. var council_1 = require("./council");
  13. exports.Council = council_1["default"];
  14. var councilseat_1 = require("./councilseat");
  15. exports.Consul = councilseat_1["default"];
  16. var councilstake_1 = require("./councilstake");
  17. exports.ConsulStake = councilstake_1["default"];
  18. var era_1 = require("./era");
  19. exports.Era = era_1["default"];
  20. var event_1 = require("./event");
  21. exports.Event = event_1["default"];
  22. var proposal_1 = require("./proposal");
  23. exports.Proposal = proposal_1["default"];
  24. var proposalpost_1 = require("./proposalpost");
  25. exports.ProposalPost = proposalpost_1["default"];
  26. var proposalvote_1 = require("./proposalvote");
  27. exports.ProposalVote = proposalvote_1["default"];
  28. var member_1 = require("./member");
  29. exports.Member = member_1["default"];
  30. var category_1 = require("./category");
  31. exports.Category = category_1["default"];
  32. var thread_1 = require("./thread");
  33. exports.Thread = thread_1["default"];
  34. var post_1 = require("./post");
  35. exports.Post = post_1["default"];
  36. var moderation_1 = require("./moderation");
  37. exports.Moderation = moderation_1["default"];
  38. member_1["default"].hasMany(account_1["default"]);
  39. member_1["default"].belongsTo(account_1["default"], { as: 'root', constraints: false });
  40. member_1["default"].belongsTo(account_1["default"], { as: 'controller', constraints: false });
  41. member_1["default"].hasMany(councilseat_1["default"], { as: 'terms' });
  42. member_1["default"].hasMany(councilstake_1["default"], { as: 'votes' });
  43. member_1["default"].hasMany(category_1["default"]);
  44. member_1["default"].hasMany(thread_1["default"]);
  45. member_1["default"].hasMany(post_1["default"]);
  46. member_1["default"].hasMany(proposal_1["default"]);
  47. account_1["default"].belongsTo(member_1["default"]);
  48. account_1["default"].hasMany(balance_1["default"]);
  49. account_1["default"].hasMany(block_1["default"], { as: 'validated', foreignKey: 'validatorKey' });
  50. account_1["default"].hasMany(moderation_1["default"]);
  51. balance_1["default"].belongsTo(account_1["default"]);
  52. balance_1["default"].belongsTo(era_1["default"]);
  53. era_1["default"].hasMany(balance_1["default"]);
  54. era_1["default"].hasMany(block_1["default"]);
  55. block_1["default"].belongsTo(account_1["default"], { as: 'validator' });
  56. block_1["default"].belongsTo(era_1["default"]);
  57. block_1["default"].hasMany(event_1["default"]);
  58. event_1["default"].belongsTo(block_1["default"]);
  59. council_1["default"].hasMany(councilseat_1["default"]);
  60. council_1["default"].hasMany(proposal_1["default"]);
  61. councilseat_1["default"].belongsTo(council_1["default"]);
  62. councilseat_1["default"].belongsTo(member_1["default"]);
  63. councilseat_1["default"].hasMany(councilstake_1["default"], { as: 'voters' });
  64. councilseat_1["default"].hasMany(proposalvote_1["default"], { as: 'votes' });
  65. councilstake_1["default"].belongsTo(councilseat_1["default"]);
  66. councilstake_1["default"].belongsTo(member_1["default"]);
  67. channel_1["default"].belongsTo(member_1["default"], { as: 'owner' });
  68. category_1["default"].hasMany(thread_1["default"]);
  69. category_1["default"].belongsTo(moderation_1["default"]);
  70. thread_1["default"].belongsTo(moderation_1["default"]);
  71. post_1["default"].belongsTo(moderation_1["default"]);
  72. moderation_1["default"].hasMany(category_1["default"]);
  73. moderation_1["default"].hasMany(thread_1["default"]);
  74. moderation_1["default"].hasMany(post_1["default"]);
  75. moderation_1["default"].belongsTo(account_1["default"], { as: 'moderator' });
  76. thread_1["default"].belongsTo(category_1["default"]);
  77. thread_1["default"].belongsTo(member_1["default"], { as: 'creator' });
  78. thread_1["default"].hasMany(post_1["default"]);
  79. post_1["default"].belongsTo(thread_1["default"]);
  80. post_1["default"].belongsTo(member_1["default"], { as: 'author' });
  81. post_1["default"].belongsTo(member_1["default"], { as: 'moderator' });
  82. proposal_1["default"].belongsTo(member_1["default"], { as: 'author' });
  83. proposal_1["default"].hasMany(proposalpost_1["default"], { as: 'posts' });
  84. proposal_1["default"].hasMany(proposalvote_1["default"], { as: 'votes' });
  85. proposalpost_1["default"].belongsTo(proposal_1["default"]);
  86. proposalpost_1["default"].belongsTo(member_1["default"], { as: 'author' });
  87. proposalvote_1["default"].belongsTo(proposal_1["default"]);
  88. proposalvote_1["default"].belongsTo(councilseat_1["default"]);
  89. proposalvote_1["default"].belongsTo(member_1["default"]);