Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Shippit - local & global parcel delivery marketplace
- Company
- # Is the company architecture provided simply as a layer of organization?
- # Probably. Am I giving companies financial advantages this way? Would I want
- # to? Doubt it. Should they handle their taxes themselves... or should the architecture?
- * id
- * name
- * street_address
- * city
- * state
- * zip
- * telephone_number
- * owner_id
- # has destructive powers.
- # can assign admins to the company.
- * administrator_ids
- # can create branches, and assign admins to a branch.
- * branch_ids
- - owner
- - administrators
- - branches
- Branch
- # Every company must have at least one branch.
- # Really? Can a company just have a company but no branches? Maybe.
- # A company can exist in which the owner is the owner, and the administrator
- # of the company, as well as the single branch admin, as well as the single courier.
- * id
- * name
- * company_id
- * coverage_area_ids
- * administrator_ids
- * courier_ids
- - company
- - coverage_areas
- - couriers
- User
- # Plain user. Default object for those shipping stuff.
- * id
- * first_name
- * middle
- * last_name
- * street_address
- * city
- * state
- * zip
- * telephone_number
- * residence_coordinate_ids
- # For google maps, bing, etc. user might be off grid and not have a "street
- # address." Would it be a good idea to calculate the longitude/latitude from
- # the address? Probably, since it would allow couriers to pinpoint their
- # location with a mobile device.
- #
- # Should the user be able to define their residence with multiple
- # coordinates? Should I only allow them one coordinate to define their
- # residence? Probably, to keep things simple.
- * shipments
- * courier coverage areas (area a courier will ship within)
- * courier maximum capacity (volume, weight)
- * courier maximum capacity reached?
- * comments
- - ship a package
- - register as a courier
- - register as a user
- Courier < User
- # mobile apps/technology will definitely be used here for picking up
- # shipments recently submitted, while courier is en route.
- * shipment_ids
- * current_position
- # allows for real-time tracking of packages.
- * next_position
- * maximum_dimensions
- # Thinking about abstracting this into an object, because I can see branch
- # admins frequently assigning the same maximum capacity to many different
- # employees
- #
- # Should probably be measured in dimensions. Max width, max height, max
- # length.
- #
- # For backpacks, stick the largest box you can find in the backpack. Measure
- # the dimensions of the box.
- * travel_method
- # e.g. bicycle, road vehicle, air transport
- *
- Employee < Courier
- * company_id
- * company_branch_ids
- # User might bounce back and forth between branches, so instead of being
- # relocated every so often, give couriers the ability to be assigned to one
- # or more branches.
- Dimension
- * length
- * width
- * height
- CompanyAdministrator < User
- # Probably won't be assigned to any branches, since they oversee company-wide
- # administrative tasks.
- * user_id
- * company_id
- BranchAdministrator < User
- * user_id
- * company_id
- MapCoordinate
- # Since longitude/latitude allows for more specificity in defining coverage
- # areas, should managers be able to draw out their coverage areas? I think
- # so.
- * longitude
- * latitude
- comment
- * id
- * author role (courier, shipper)
- * author
- * user
- delivery coverage area
- * id
- * coordinates
- * radius
- shipment
- * id
- * parcels
- * arrival datetime
- * departure datetime
- * status (draft, submitted, en route, canceled (by sender), rejected (by courier), delivered, failed)
- # should a shipment fail, and the user wishes to retry,
- * failure reason (courier did not arrive/unavailable, sender unavailable, shipment lost by courier)
- * subtotal
- - completed? status == delivered
- parcel
- * id
- * type (letter, package, pallet)
- * dimensions (stored as meters, displayed as US units or meters, depending on location)
- deduction
- * id
- * subtotal
- courier
- * id
- * title
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement