tables.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /**
  2. * Dummy data, grouped by table.
  3. *
  4. * @type {Object}
  5. */
  6. module.exports = {
  7. // Messages (message)
  8. message: [
  9. { id: 10, subject: 'msgA', body: 'A test message.', from: 1 },
  10. { id: 20, subject: 'msgB', body: 'Another test message.', from: 1 },
  11. { id: 30, subject: 'msgC', body: 'Aint sent this one yet.', from: null }
  12. ],
  13. // Users (user)
  14. user: [
  15. { id: 1, email: 'sender@thatguy.com' },
  16. { id: 2, email: 'a@recipient.com' },
  17. { id: 3, email: 'b@recipient.com' },
  18. { id: 4, email: 'c@recipient.com' },
  19. { id: 5, email: 'd@recipient.com' },
  20. { id: 6, email: 'e@recipient.com' }
  21. ],
  22. // message_to_user
  23. message_to_user: [
  24. {
  25. id: 1,
  26. message_id: 10,
  27. user_id: 2
  28. },
  29. {
  30. id: 2,
  31. message_id: 10,
  32. user_id: 3
  33. }
  34. ],
  35. // message_cc_user
  36. message_cc_user: [
  37. {
  38. id: 1,
  39. message_id: 10,
  40. user_id: 4
  41. },
  42. {
  43. id: 2,
  44. message_id: 10,
  45. user_id: 5
  46. }
  47. ],
  48. // message_bcc_user
  49. message_bcc_user: [
  50. {
  51. id: 1,
  52. message_id: 10,
  53. user_id: 6
  54. }
  55. ]
  56. };
  57. // Note: Even 1..N relationships could potentially be represented this way as a base assumption--
  58. // message_id would just have a unique constraint. Not right now though!
  59. //
  60. // var message_from_user = [
  61. // {
  62. // id: 1,
  63. // message_id: 10,
  64. // user_id: 1
  65. // }
  66. // ];