Skip to content

Entities Definition

Denys edited this page Apr 16, 2020 · 3 revisions

This page describes entities with the project is base on

Organization -  non-profit organization that would like to coordinate or offer help, responsible for providing the requests for supplies from different hospitals / medical organization.  (ex. UNICEF / Patients Ukraine/ Свої/ RNBO volunteers)

Beneficiary - hospital or medical organization, which requires supplies. Can they create their own requests on the platform (maybe not the 1st version, but not locked)

User:Supervisor - Employee of organization, who is responsible for a certain number of requests. Manages, controls and reviews the requests for supplies.

User:Volunteer - person or organization, which provides the supplies

User:Administrator - system(web-site) admin

SupplyRequest - request of a specific item from Beneficiary.

SupplyRequest:State - What happens at the current moment with the order.

Data Schema

Diagram PlantUML code

@startuml

' Hint
' Zero or One	|o--
' Exactly One	||--
' Zero or Many	}o--
' One or Many	}|--
' * - not null

entity "Organization" as org {
  --
  *name : text
  description : text
  contacts: []
}

entity "Beneficiary" as ben {
  --
  *name : text
  *adress : text
  *location: [lat,lgn]
  contacts: []
}

entity "User:Supervisor" as uSup {
  --
   *name : text
   *isActivated: boolean
}

entity "User:Volunteer " as uVol {
  --
  *name : text
  *isActivated: boolean
  contacts: []
}

entity "Request" as req {
    --
    *privacy: PrivacyEnum
    *status: ReqStatusEnum
}

entity "Item" as item {
  --
  *name : text
  *count: number
  *status: ItemStatusEnum
}

entity "Offer" as offer {
  --
  *count: number
  *status: OfferStatusEnum
}

entity "RequestItemStateLog" as reqLog {
  --
  statusFrom: StatusEnum
  *statusTo: StatusEnum
  *user: User.id
  *modifiedDate: timestamp
}

entity "OfferStateLog" as offerLog {
  --
  statusFrom: StatusEnum
  *statusTo: StatusEnum
  *user: User.id
  *modifiedDate: timestamp
}


org ||--|{ uSup
org ||--o{ req
ben ||--o{ req
req ||--|{ item
item ||--|{ reqLog
item |o--|{ offer
uVol |o--o{ offer
offer ||--|{ offerLog

@enduml
Clone this wiki locally