Advertisement
Guest User

Untitled

a guest
Jul 24th, 2012
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. # Shippit - local & global parcel delivery marketplace
  2.  
  3. Company
  4. # Is the company architecture provided simply as a layer of organization?
  5. # Probably. Am I giving companies financial advantages this way? Would I want
  6. # to? Doubt it. Should they handle their taxes themselves... or should the architecture?
  7. * id
  8. * name
  9. * street_address
  10. * city
  11. * state
  12. * zip
  13. * telephone_number
  14. * owner_id
  15. # has destructive powers.
  16. # can assign admins to the company.
  17. * administrator_ids
  18. # can create branches, and assign admins to a branch.
  19. * branch_ids
  20. - owner
  21. - administrators
  22. - branches
  23.  
  24. Branch
  25. # Every company must have at least one branch.
  26. # Really? Can a company just have a company but no branches? Maybe.
  27. # A company can exist in which the owner is the owner, and the administrator
  28. # of the company, as well as the single branch admin, as well as the single courier.
  29. * id
  30. * name
  31. * company_id
  32. * coverage_area_ids
  33. * administrator_ids
  34. * courier_ids
  35. - company
  36. - coverage_areas
  37. - couriers
  38.  
  39. User
  40. # Plain user. Default object for those shipping stuff.
  41. * id
  42. * first_name
  43. * middle
  44. * last_name
  45. * street_address
  46. * city
  47. * state
  48. * zip
  49. * telephone_number
  50. * residence_coordinate_ids
  51. # For google maps, bing, etc. user might be off grid and not have a "street
  52. # address." Would it be a good idea to calculate the longitude/latitude from
  53. # the address? Probably, since it would allow couriers to pinpoint their
  54. # location with a mobile device.
  55. #
  56. # Should the user be able to define their residence with multiple
  57. # coordinates? Should I only allow them one coordinate to define their
  58. # residence? Probably, to keep things simple.
  59. * shipments
  60. * courier coverage areas (area a courier will ship within)
  61. * courier maximum capacity (volume, weight)
  62. * courier maximum capacity reached?
  63. * comments
  64. - ship a package
  65. - register as a courier
  66. - register as a user
  67.  
  68. Courier < User
  69. # mobile apps/technology will definitely be used here for picking up
  70. # shipments recently submitted, while courier is en route.
  71. * shipment_ids
  72. * current_position
  73. # allows for real-time tracking of packages.
  74. * next_position
  75. * maximum_dimensions
  76. # Thinking about abstracting this into an object, because I can see branch
  77. # admins frequently assigning the same maximum capacity to many different
  78. # employees
  79. #
  80. # Should probably be measured in dimensions. Max width, max height, max
  81. # length.
  82. #
  83. # For backpacks, stick the largest box you can find in the backpack. Measure
  84. # the dimensions of the box.
  85. * travel_method
  86. # e.g. bicycle, road vehicle, air transport
  87. *
  88.  
  89. Employee < Courier
  90. * company_id
  91. * company_branch_ids
  92. # User might bounce back and forth between branches, so instead of being
  93. # relocated every so often, give couriers the ability to be assigned to one
  94. # or more branches.
  95.  
  96. Dimension
  97. * length
  98. * width
  99. * height
  100.  
  101. CompanyAdministrator < User
  102. # Probably won't be assigned to any branches, since they oversee company-wide
  103. # administrative tasks.
  104. * user_id
  105. * company_id
  106.  
  107. BranchAdministrator < User
  108. * user_id
  109. * company_id
  110.  
  111. MapCoordinate
  112. # Since longitude/latitude allows for more specificity in defining coverage
  113. # areas, should managers be able to draw out their coverage areas? I think
  114. # so.
  115. * longitude
  116. * latitude
  117.  
  118. comment
  119. * id
  120. * author role (courier, shipper)
  121. * author
  122. * user
  123.  
  124. delivery coverage area
  125. * id
  126. * coordinates
  127. * radius
  128.  
  129. shipment
  130. * id
  131. * parcels
  132. * arrival datetime
  133. * departure datetime
  134. * status (draft, submitted, en route, canceled (by sender), rejected (by courier), delivered, failed)
  135. # should a shipment fail, and the user wishes to retry,
  136. * failure reason (courier did not arrive/unavailable, sender unavailable, shipment lost by courier)
  137. * subtotal
  138. - completed? status == delivered
  139.  
  140. parcel
  141. * id
  142. * type (letter, package, pallet)
  143. * dimensions (stored as meters, displayed as US units or meters, depending on location)
  144.  
  145. deduction
  146. * id
  147. * subtotal
  148.  
  149. courier
  150. * id
  151. * title
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement