Advertisement
stronk_8s

Project Managment Structure

Aug 23rd, 2024 (edited)
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.90 KB | Source Code | 0 0
  1. //Collection
  2.  
  3. const Client = {
  4. _id: ObjectId(),
  5. client_name: '',
  6. mobile_nos: [], // Array of mobile numbers
  7. organisation: ObjectId(), // Nullable, references Organisation with auto-population
  8. recordstatus: Int, // Status of the record (Consider using enums)
  9. timestamp: Date(), // Time of creation or last update
  10. };
  11.  
  12. const Employee = {
  13. _id: ObjectId(),
  14. employee_id: '', // Unique employee identifier
  15. employee_name: '',
  16. email: '',
  17. role: '',
  18. addresses: [], // Array of addresses
  19. mobile_nos: [], // Array of mobile numbers
  20. recordstatus: Int, // Status of the record (Consider using enums)
  21. timestamp: Date(), // Time of creation or last update
  22. };
  23.  
  24. const Login = {
  25. _id: ObjectId(),
  26. employee_id: '', // Employee reference
  27. password: '', // Hashed password for security
  28. recordstatus: Int, // Status of the record (Consider using enums)
  29. timestamp: Date(), // Time of creation or last update
  30. };
  31.  
  32. const Organisation = {
  33. _id: ObjectId(),
  34. organisation_name: '',
  35. mobile_nos: [], // Array of mobile numbers
  36. addresses: [], // Array of addresses
  37. recordstatus: Int, // Status of the record (Consider using enums)
  38. timestamp: Date(), // Time of creation or last update
  39. };
  40.  
  41. const Project = {
  42. _id: ObjectId(),
  43. project_title: '',
  44. details: '', // Project details
  45. deadline: Date(), // Deadline for project completion
  46. client: ObjectId(), // References Client with auto-population
  47. project_received_date: Date(), // Date the project was received
  48. recordstatus: Int, // Status of the record (Consider using enums)
  49. timestamp: Date(), // Time of creation or last update
  50. };
  51.  
  52. const Task = {
  53. _id: ObjectId(),
  54. task_title: '',
  55. details: '', // Task details
  56. deadline: Date(), // Task deadline
  57. project: ObjectId(), // References Project with auto-population
  58. recordstatus: Int, // Status of the record (Consider using enums)
  59. timestamp: Date(), // Time of creation or last update
  60. };
  61.  
  62. const Team = {
  63. _id: ObjectId(),
  64. project: ObjectId(), // References Project with auto-population
  65. team: [], // Array of Employee IDs with auto-population
  66. leader: ObjectId(), // References Employee as leader with auto-population
  67. recordstatus: Int, // Status of the record (Consider using enums)
  68. timestamp: Date(), // Time of creation or last update
  69. };
  70.  
  71.  
  72.  
  73.  
  74. //PROJECT FILE STRUCTURE
  75.  
  76. /src
  77. ├── /database
  78. │ └── db.js
  79. ├── /graphql
  80. │ ├── /resolvers
  81. │ │ ├── /mutation
  82. │ │ │ └── /organisation
  83. │ │ │ ├── add.organisation.js
  84. │ │ │ ├── delete.organisation.js
  85. │ │ │ ├── organisation.index.js
  86. │ │ │ ├── update.organisation.js
  87. │ │ │ └── mutation.index.js
  88. │ │ ├── /queries
  89. │ │ │ └── /organisation
  90. │ │ │ ├── get.organisation.js
  91. │ │ │ ├── organisation.index.js
  92. │ │ │ └── query.index.js
  93. │ │ └── resolver.index.js
  94. │ ├── /typeDefs
  95. │ │ ├── /inputs
  96. │ │ │ └── organisation.input.gql
  97. │ │ ├── /mutations
  98. │ │ │ └── mutation.index.js
  99. │ │ ├── /queries
  100. │ │ │ └── query.index.js
  101. │ │ ├── /types
  102. │ │ │ ├── organisation.type.gql
  103. │ │ │ ├── response.type.gql
  104. │ │ │ └── type.index.js
  105. │ │ └── typedef.index.js
  106. │ └── graphql.index.js
  107. ├── /models
  108. │ ├── client.model.js
  109. │ ├── employee.model.js
  110. │ ├── login.model.js
  111. │ ├── organisation.model.js
  112. │ ├── project.model.js
  113. │ ├── task.model.js
  114. │ └── team.model.js
  115. ├── /utils
  116. │ ├── recordStatus.js
  117. │ └── response.js
  118. ├── app.js
  119. └── server.js
  120.  
  121.  
  122.  
  123.  
Tags: mongo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement