docs: Restructure backend and API documentation by moving relevant files into a new docs/BACKEND directory.
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
flowchart LR
|
||||
|
||||
subgraph C1["Login"]
|
||||
S_client_sign_in["client_sign_in_screen.dart"]
|
||||
S_client_sign_in --> S_client_sign_in_Q["Queries<br/>* user - getUserById<br/>* business - getBusinessesByUserId"]
|
||||
S_client_sign_in --> S_client_sign_in_F["Firebase<br/>* user - auth"]
|
||||
end
|
||||
|
||||
subgraph C2["Create account"]
|
||||
S_client_sign_up["client_sign_up_screen.dart"]
|
||||
S_client_sign_up --> S_client_sign_up_Q["Queries<br/>* business - getBusinessesByUserId"]
|
||||
S_client_sign_up --> S_client_sign_up_M["Mutations<br/>* user - createUser<br/>* business - createBusiness"]
|
||||
end
|
||||
|
||||
subgraph C3["Edit account"]
|
||||
S_edit_account_na["manual_or_unknown_screen.dart"]
|
||||
S_edit_account_na --> S_edit_account_na_M["Mutations<br/>* business - updateBusiness"]
|
||||
end
|
||||
|
||||
subgraph C4["Profile"]
|
||||
S_client_settings["client_settings_screen.dart"]
|
||||
S_client_settings --> S_client_settings_Q["Queries<br/>* user - getUserById<br/>* business - getBusinessesByUserId"]
|
||||
end
|
||||
|
||||
subgraph C5["Hubs"]
|
||||
S_client_hubs["client_hubs_screen.dart"]
|
||||
S_client_hubs --> S_client_hubs_Q["Queries<br/>* TeamHub - listTeamHubsByOwnerId"]
|
||||
S_client_hubs --> S_client_hubs_M["Mutations<br/>* TeamHub - createTeamHub<br/>* TeamHub - updateTeamHub<br/>* TeamHub - deleteTeamHub"]
|
||||
end
|
||||
|
||||
subgraph C6["Orders"]
|
||||
S_client_shifts["client_shifts_screen.dart"]
|
||||
S_client_shifts --> S_client_shifts_Q["Queries<br/>* order - getOrdersByBusinessId"]
|
||||
end
|
||||
|
||||
subgraph C7["RAPID Order"]
|
||||
S_rapid_order["rapid_order_flow_page.dart"]
|
||||
S_rapid_order --> S_rapid_order_M["Mutations<br/>* order - createOrder"]
|
||||
end
|
||||
|
||||
subgraph C8["One-time Order"]
|
||||
S_one_time["one_time_order_flow_page.dart"]
|
||||
S_one_time --> S_one_time_Q["Queries<br/>* role - listRolesByOwnerId"]
|
||||
S_one_time --> S_one_time_M["Mutations<br/>* ShiftRole - createShiftRole<br/>* order - createOrder"]
|
||||
end
|
||||
|
||||
subgraph C9["Permanent Placement"]
|
||||
S_permanent["permanent_order_flow_page.dart"]
|
||||
S_permanent --> S_permanent_Q["Queries<br/>* role - listRolesByOwnerId"]
|
||||
S_permanent --> S_permanent_M["Mutations<br/>* ShiftRole - createShiftRole<br/>* order - createOrder"]
|
||||
end
|
||||
|
||||
subgraph C10["Recurring Order"]
|
||||
S_recurring["recurring_order_flow_page.dart"]
|
||||
S_recurring --> S_recurring_Q["Queries<br/>* role - listRolesByOwnerId"]
|
||||
S_recurring --> S_recurring_M["Mutations<br/>* ShiftRole - createShiftRole<br/>* order - createOrder"]
|
||||
end
|
||||
|
||||
subgraph C11["Billing"]
|
||||
S_billing["client_billing_screen.dart"]
|
||||
S_billing --> S_billing_Q["Queries<br/>* account - getAccountsByOwnerId<br/>* invoice - listInvoicesByBusinessId<br/>* recentPayment - listRecentPaymentsByBusinessId"]
|
||||
S_billing --> S_billing_M["Mutations<br/>* account - createAccount<br/>* account - updateAccount<br/>* account - deleteAccount"]
|
||||
end
|
||||
|
||||
subgraph C12["Coverage"]
|
||||
S_coverage["coverage_dashboard.dart"]
|
||||
S_coverage --> S_coverage_Q["Queries<br/>* order - getOrdersByBusinessId<br/>* shift - getShiftsByBusinessId<br/>* application - getApplicationsByShiftId"]
|
||||
end
|
||||
|
||||
subgraph C13["Home"]
|
||||
S_client_home["client_home_screen.dart"]
|
||||
S_client_home --> S_client_home_Q["Queries<br/>* order - getOrdersByBusinessId<br/>* shift - getShiftsByBusinessId<br/>* application - getApplicationsByShiftId<br/>* recentPayment - listRecentPaymentsByBusinessId"]
|
||||
S_client_home --> S_client_home_M["Mutations<br/>* order - createOrder"]
|
||||
end
|
||||
@@ -0,0 +1,121 @@
|
||||
flowchart LR
|
||||
|
||||
subgraph L1["login/create user"]
|
||||
S_auth_phone["phone_verification_screen.dart"]
|
||||
S_auth_phone --> S_auth_phone_Q["Queries<br/>* user - getUserById<br/>* staff - getStaffByUserId"]
|
||||
S_auth_phone --> S_auth_phone_M["Mutations<br/>* user - createUser"]
|
||||
S_auth_phone --> S_auth_phone_F["Firebase<br/>* user - auth"]
|
||||
end
|
||||
|
||||
subgraph L2["Profile"]
|
||||
S_worker_profile["worker_profile_screen.dart"]
|
||||
S_worker_profile --> S_worker_profile_Q["Queries<br/>* user - getUserById<br/>* staff - getStaffByUserId"]
|
||||
end
|
||||
|
||||
subgraph L3["Personal info"]
|
||||
S_personal_info["personal_info_screen.dart"]
|
||||
S_personal_info --> S_personal_info_Q["Queries<br/>* staff - getStaffByUserId"]
|
||||
S_personal_info --> S_personal_info_M["Mutations<br/>* staff - UpdateStaff"]
|
||||
end
|
||||
|
||||
subgraph L4["Emergency Contact"]
|
||||
S_emergency["emergency_contact_screen.dart"]
|
||||
S_emergency --> S_emergency_Q["Queries<br/>* emergencyContact - getEmergencyContactsByStaffId"]
|
||||
S_emergency --> S_emergency_M["Mutations<br/>* conemergencyContacttact - updateEmergencyContact<br/>* emergencyContact - createEmergencyContact<br/>* contemergencyContactact - deleteEmergencyContact"]
|
||||
end
|
||||
|
||||
subgraph L5["Experience & skills"]
|
||||
S_experience["experience_screen.dart"]
|
||||
S_experience --> S_experience_Q["Queries<br/>* staff - getStaffByUserId"]
|
||||
S_experience --> S_experience_M["Mutations<br/>* staff - UpdateStaff"]
|
||||
end
|
||||
|
||||
subgraph L6["Attire"]
|
||||
S_attire["attire_screen.dart"]
|
||||
S_attire --> S_attire_Q["Queries<br/>* attireOption - filterAttireOptions<br/>* staff - getStaffByUserId"]
|
||||
S_attire --> S_attire_M["Mutations<br/>* staff - UpdateStaff"]
|
||||
end
|
||||
|
||||
subgraph L7["Documents"]
|
||||
S_documents["documents_screen.dart"]
|
||||
S_documents --> S_documents_Q["Queries<br/>* document - listDocuments<br/>* staffDocument - listStaffDocumentsByStaffId"]
|
||||
S_documents --> S_documents_M["Mutations<br/>* staffDocument - updateStaffDocument<br/>* staffDocument - createStaffDocument"]
|
||||
end
|
||||
|
||||
subgraph L8["Certificates"]
|
||||
S_certificates["certificates_screen.dart"]
|
||||
S_certificates --> S_certificates_Q["Queries<br/>* certificate - listCertificatesByStaffId"]
|
||||
S_certificates --> S_certificates_M["Mutations<br/>* certificate - UpdateCertificate<br/>* certificate - CreateCertificate<br/>* certificate - DeleteCertificate"]
|
||||
end
|
||||
|
||||
subgraph L9["Tax Documents"]
|
||||
S_tax_forms["tax_forms_screen.dart"]
|
||||
S_tax_forms --> S_tax_forms_Q["Queries<br/>* taxForm - getTaxFormsBystaffId"]
|
||||
S_tax_forms --> S_tax_forms_M["Mutations<br/>* taxForm - createTaxForm<br/>* taxForm - updateTaxForm"]
|
||||
end
|
||||
|
||||
subgraph L10["KROW University"]
|
||||
S_uni["krow_university_screen.dart"]
|
||||
S_uni --> S_uni_Q["Queries<br/>* course - listCourses<br/>* staffCourse - listStaffCoursesByStaffId<br/>* staff - getStaffByUserId<br/>* level - listLevels<br/>* certificate - listCertificatesByStaffId"]
|
||||
end
|
||||
|
||||
subgraph L11["Trainings"]
|
||||
S_trainings["trainings_screen.dart"]
|
||||
S_trainings --> S_trainings_Q["Queries<br/>* course - listCourses<br/>* staffCourse - listStaffCoursesByStaffId"]
|
||||
end
|
||||
|
||||
subgraph L12["Leaderboard"]
|
||||
S_leaderboard["leaderboard_screen.dart"]
|
||||
S_leaderboard --> S_leaderboard_Q["Queries<br/>* staffCourse - missing"]
|
||||
end
|
||||
|
||||
subgraph L13["Bank Account"]
|
||||
S_bank["bank_account_screen.dart"]
|
||||
S_bank --> S_bank_Q["Queries<br/>* account - getAccountsByOwnerId"]
|
||||
S_bank --> S_bank_M["Mutations<br/>* account - createAccount<br/>* account - updateAccount<br/>* account - deleteAccount"]
|
||||
end
|
||||
|
||||
subgraph L14["Earnings/Payments"]
|
||||
S_payments["payments_screen.dart"]
|
||||
S_payments --> S_payments_Q["Queries<br/>* recentPayment - listRecentPaymentsByStaffId"]
|
||||
end
|
||||
|
||||
subgraph L15["Timecard"]
|
||||
S_timecard["time_card_screen.dart"]
|
||||
S_timecard --> S_timecard_Q["Queries<br/>* application - getApplicationsByStaffId"]
|
||||
end
|
||||
|
||||
subgraph L16["Clock in"]
|
||||
S_clockin["clock_in_screen.dart"]
|
||||
S_clockin --> S_clockin_Q["Queries<br/>* application - getApplicationsByStaffId"]
|
||||
S_clockin --> S_clockin_M["Mutations<br/>* application - createApplication<br/>* application - updateApplicationStatus"]
|
||||
end
|
||||
|
||||
subgraph L17["Shifts"]
|
||||
S_shifts["shifts_screen.dart"]
|
||||
S_shifts --> S_shifts_Q["Queries<br/>* application - getApplicationsByStaffId<br/>* shiftRole - listShiftRolesByVendorId/listShiftRolesByRoleId<br/>* application - getApplicationsByStaffId"]
|
||||
S_shifts --> S_shifts_M["Mutations<br/>* application - updateApplicationStatus<br/>* application - createApplication"]
|
||||
end
|
||||
|
||||
subgraph L18["My availability"]
|
||||
S_availability["availability_screen.dart"]
|
||||
S_availability --> S_availability_Q["Queries<br/>* staffAvailability - listStaffAvailabilitiesByStaffId/getStaffAvailabilityByKey"]
|
||||
S_availability --> S_availability_M["Mutations<br/>* staffAvailability - updateStaffAvailability<br/>* staffAvailability - createStaffAvailability<br/>* staffAvailability - deleteStaffAvailability"]
|
||||
end
|
||||
|
||||
subgraph L19["Your Benefits Overview"]
|
||||
S_benefits["benefits_screen.dart"]
|
||||
S_benefits --> S_benefits_Q["Queries<br/>* benefitsData - listBenefitsDataByStaffId"]
|
||||
S_benefits --> S_benefits_M["Mutations<br/>* benefitsData - updateBenefitsData<br/>* benefitsData - createBenefitsData"]
|
||||
end
|
||||
|
||||
subgraph L20["Home"]
|
||||
S_home["worker_home_screen.dart"]
|
||||
S_home --> S_home_Q["Queries<br/>* application - getApplicationsByStaffId<br/>* shiftRole - listShiftRolesByVendorId/listShiftRolesByRoleId<br/>* benefitsData - getBenefitsDataByStaffId"]
|
||||
end
|
||||
|
||||
subgraph L21["Shift detail"]
|
||||
S_shift_detail["shift_details_screen.dart"]
|
||||
S_shift_detail --> S_shift_detail_Q["Queries<br/>* application - getApplicationsByStaffId"]
|
||||
S_shift_detail --> S_shift_detail_M["Mutations<br/>* application - updateApplicationStatus"]
|
||||
end
|
||||
@@ -0,0 +1,130 @@
|
||||
---
|
||||
config:
|
||||
theme: mc
|
||||
layout: dagre
|
||||
---
|
||||
classDiagram
|
||||
direction TB
|
||||
class User {
|
||||
id: String
|
||||
email: String
|
||||
}
|
||||
|
||||
class Business {
|
||||
id: UUID
|
||||
userId: String
|
||||
businessName: String
|
||||
status: BusinessStatus
|
||||
}
|
||||
|
||||
class Vendor {
|
||||
id: UUID
|
||||
userId: String
|
||||
companyName: String
|
||||
}
|
||||
|
||||
class Order {
|
||||
id: UUID
|
||||
businessId: UUID
|
||||
vendorId: UUID
|
||||
status: OrderStatus
|
||||
}
|
||||
|
||||
class Shift {
|
||||
id: UUID
|
||||
orderId: UUID
|
||||
status: ShiftStatus
|
||||
}
|
||||
|
||||
class ShiftRole {
|
||||
shiftId: UUID
|
||||
roleId: UUID
|
||||
}
|
||||
|
||||
class Role {
|
||||
id: UUID
|
||||
name: String
|
||||
vendorId: UUID
|
||||
}
|
||||
|
||||
class Application {
|
||||
id: UUID
|
||||
shiftId: UUID
|
||||
staffId: UUID
|
||||
roleId: UUID
|
||||
}
|
||||
|
||||
class Invoice {
|
||||
id: UUID
|
||||
businessId: UUID
|
||||
vendorId: UUID
|
||||
orderId: UUID
|
||||
status: InvoiceStatus
|
||||
}
|
||||
|
||||
class InvoiceTemplate {
|
||||
id: UUID
|
||||
name: String
|
||||
ownerId: UUID
|
||||
businessId: UUID
|
||||
vendorId: UUID
|
||||
}
|
||||
|
||||
class RecentPayment {
|
||||
id: UUID
|
||||
invoiceId: UUID
|
||||
applicationId: UUID
|
||||
staffId: UUID
|
||||
}
|
||||
|
||||
class ClientFeedback {
|
||||
id: UUID
|
||||
businessId: UUID
|
||||
vendorId: UUID
|
||||
rating: Int
|
||||
}
|
||||
|
||||
class Team {
|
||||
id: UUID
|
||||
teamName: String
|
||||
ownerId: String
|
||||
}
|
||||
|
||||
class TeamMember {
|
||||
id: UUID
|
||||
teamId: UUID
|
||||
userId: String
|
||||
role: TeamMemberRole
|
||||
}
|
||||
|
||||
class TeamHub {
|
||||
id: UUID
|
||||
teamId: UUID
|
||||
hubName: String
|
||||
}
|
||||
|
||||
class Staff {
|
||||
id: UUID
|
||||
userId: String
|
||||
}
|
||||
|
||||
note for Staff "business can create a staff too"
|
||||
|
||||
Business "1" -- "*" Order : places
|
||||
Business "1" -- "*" Invoice : receives
|
||||
Business "1" -- "*" ClientFeedback : gives
|
||||
Business "1" --o "1" Team : (ownerId)
|
||||
Business "1" --o "*" InvoiceTemplate : (ownerId)
|
||||
User "1" -- "1" Business : owns
|
||||
Vendor "1" -- "*" Order : fulfills
|
||||
Vendor "1" -- "*" Invoice : issues
|
||||
Order "1" -- "*" Shift : contains
|
||||
Order "1" -- "1" Invoice : billed via
|
||||
Shift "1" -- "*" ShiftRole : requires
|
||||
ShiftRole "1" -- "1" Role
|
||||
ShiftRole "1" -- "*" Application : target for
|
||||
Application "1" -- "1" Staff
|
||||
Application "1" -- "1" RecentPayment
|
||||
Invoice "1" -- "*" RecentPayment : paid through
|
||||
Team "1" -- "*" TeamHub : contains
|
||||
Team "1" -- "*" TeamMember : has
|
||||
@@ -0,0 +1,181 @@
|
||||
classDiagram
|
||||
direction TB
|
||||
class User {
|
||||
id: String
|
||||
email: String
|
||||
fullName: String
|
||||
role: UserBaseRole
|
||||
}
|
||||
|
||||
class Staff {
|
||||
id: UUID
|
||||
userId: String
|
||||
fullName: String
|
||||
ownerId: UUID
|
||||
hubId: UUID
|
||||
rollId: UUID
|
||||
status: BackgroundCheckStatus
|
||||
}
|
||||
|
||||
class Account{
|
||||
id: UUID
|
||||
ownerId:UUID
|
||||
type:AccountType
|
||||
}
|
||||
|
||||
class Workforce {
|
||||
id: UUID
|
||||
vendorId: UUID
|
||||
staffId: UUID
|
||||
status: WorkforceStatus
|
||||
}
|
||||
|
||||
class Application {
|
||||
id: UUID
|
||||
shiftId: UUID
|
||||
staffId: UUID
|
||||
roleId: UUID
|
||||
status: ApplicationStatus
|
||||
}
|
||||
|
||||
class Assignment {
|
||||
id: UUID
|
||||
workforceId: UUID
|
||||
shiftId: UUID
|
||||
roleId: UUID
|
||||
status: AssignmentStatus
|
||||
}
|
||||
|
||||
class ShiftRole {
|
||||
id: UUID
|
||||
shiftId: UUID
|
||||
roleId: UUID
|
||||
}
|
||||
|
||||
class Shift {
|
||||
id: UUID
|
||||
orderId: UUID
|
||||
status: ShiftStatus
|
||||
}
|
||||
|
||||
class Order {
|
||||
id: UUID
|
||||
vendorId: UUID
|
||||
businessId: UUID
|
||||
status: OrderStatus
|
||||
}
|
||||
|
||||
class Vendor {
|
||||
id: UUID
|
||||
userId: String
|
||||
companyName: String
|
||||
}
|
||||
|
||||
class Business {
|
||||
id: UUID
|
||||
userId: String
|
||||
businessName: String
|
||||
}
|
||||
|
||||
class Role {
|
||||
id: UUID
|
||||
name: String
|
||||
vendorId: UUID
|
||||
roleCategoryId: UUID
|
||||
}
|
||||
|
||||
class StaffDocument {
|
||||
staffId: UUID
|
||||
documentId: UUID
|
||||
status: DocumentStatus
|
||||
}
|
||||
|
||||
class Document {
|
||||
id: UUID
|
||||
name: String
|
||||
documentType: DocumentType
|
||||
}
|
||||
|
||||
class StaffCourse {
|
||||
staffId: UUID
|
||||
courseId: UUID
|
||||
}
|
||||
|
||||
class Course {
|
||||
id: UUID
|
||||
title: String
|
||||
categoryId: UUID
|
||||
}
|
||||
|
||||
class Category {
|
||||
id: UUID
|
||||
label: String
|
||||
}
|
||||
|
||||
class StaffAvailability {
|
||||
staffId: UUID
|
||||
day: DayOfWeek
|
||||
slot: AvailabilitySlot
|
||||
}
|
||||
|
||||
class Certificate {
|
||||
staffId: UUID
|
||||
certificationType: ComplianceType
|
||||
status: CertificateStatus
|
||||
}
|
||||
|
||||
class BenefitData {
|
||||
staffId: UUID
|
||||
vendorBenefitPlanId: UUID
|
||||
current: int
|
||||
}
|
||||
|
||||
class Contact {
|
||||
staffId: UUID
|
||||
relationship: RelationshipType
|
||||
name: string
|
||||
}
|
||||
|
||||
class Invoice {
|
||||
orderId: UUID
|
||||
}
|
||||
|
||||
class RecentPayment {
|
||||
staffId: UUID
|
||||
applicationId: UUID
|
||||
status: RecentPaymentStatus
|
||||
}
|
||||
|
||||
class TaxForm {
|
||||
staffId: UUID
|
||||
formType: TaxFormType
|
||||
status: TaxFormStatus
|
||||
}
|
||||
|
||||
User "1" -- "1" Staff : has
|
||||
Staff "1" -- "*" Application : applies to
|
||||
Staff "1" -- "*" Workforce : part of
|
||||
Staff "1" -- "*" StaffDocument : has
|
||||
Staff "1" -- "*" Certificate : has
|
||||
Staff "1" -- "*" BenefitData : has
|
||||
Staff "1" -- "*" Contact : has
|
||||
Staff "1" -- "*" TaxForm : has
|
||||
Staff "1" -- "*" Account : has
|
||||
Staff "1" -- "*" StaffCourse : takes
|
||||
Staff "1" -- "*" StaffAvailability : sets
|
||||
Workforce "1" -- "*" Assignment : receives
|
||||
Assignment -- ShiftRole
|
||||
Vendor "1" -- "*" Order : receives
|
||||
Business "1" -- "*" Order : places
|
||||
Order "1" -- "1" Invoice : has
|
||||
Invoice "1" -- "*" RecentPayment : has
|
||||
RecentPayment "1" -- "1" Application : has
|
||||
Staff "1" --o "1" Vendor : (ownerId)
|
||||
Staff "1" --o "1" Business : (ownerId)
|
||||
Application -- ShiftRole
|
||||
ShiftRole "*" -- "1" Shift : belongs to
|
||||
ShiftRole "*" -- "1" Role : defines
|
||||
Shift "*" -- "1" Order : belongs to
|
||||
StaffDocument "1" -- "1" Document : references
|
||||
StaffCourse "1" -- "1" Course : references
|
||||
Course "1" -- "1" Category : belongs to
|
||||
@@ -0,0 +1,79 @@
|
||||
---
|
||||
config:
|
||||
layout: elk
|
||||
theme: mc
|
||||
---
|
||||
classDiagram
|
||||
class User {
|
||||
id: String
|
||||
email: String
|
||||
fullName: String
|
||||
}
|
||||
|
||||
class TeamMember {
|
||||
id: UUID
|
||||
teamId: UUID
|
||||
userId: String
|
||||
teamHubId: UUID
|
||||
role: TeamMemberRole
|
||||
inviteStatus: TeamMemberInviteStatus
|
||||
inviteCode: UUID
|
||||
}
|
||||
|
||||
class Team {
|
||||
id: UUID
|
||||
teamName: String
|
||||
ownerId: String
|
||||
}
|
||||
|
||||
class TeamHub {
|
||||
id: UUID
|
||||
teamId: UUID
|
||||
hubName: String
|
||||
}
|
||||
|
||||
class TeamHudDepartment {
|
||||
id: UUID
|
||||
name: String
|
||||
teamHubId: UUID
|
||||
}
|
||||
|
||||
class MemberTask {
|
||||
teamMemberId: UUID
|
||||
taskId: UUID
|
||||
}
|
||||
|
||||
class Task {
|
||||
id: UUID
|
||||
taskName: String
|
||||
status: TaskStatus
|
||||
priority: TaskPriority
|
||||
ownerId: UUID
|
||||
}
|
||||
|
||||
class Vendor {
|
||||
id: UUID
|
||||
companyName: String
|
||||
}
|
||||
|
||||
class Business {
|
||||
id: UUID
|
||||
businessName: String
|
||||
}
|
||||
|
||||
User "1" -- "1" TeamMember : has
|
||||
|
||||
Team "1" -- "*" TeamHub : contains
|
||||
Team "1" --o "1" Vendor : (ownerId)
|
||||
Team "1" --o "1" Business : (ownerId)
|
||||
|
||||
TeamHub "1" -- "*" TeamHudDepartment : has
|
||||
TeamHub "1" -- "*" TeamMember : is assigned to
|
||||
|
||||
TeamMember "*" -- "1" Team
|
||||
TeamMember "1" -- "*" MemberTask : has assigned
|
||||
|
||||
Task "1" -- "*" MemberTask : is assigned to
|
||||
Task --o Vendor : (ownerId)
|
||||
Task --o Business : (ownerId)
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
|
||||
classDiagram
|
||||
direction TB
|
||||
class User {
|
||||
id: String
|
||||
email: String
|
||||
fullName: String
|
||||
role: UserBaseRole
|
||||
}
|
||||
|
||||
class Staff {
|
||||
id: UUID
|
||||
userId: String
|
||||
fullName: String
|
||||
ownerId: UUID
|
||||
hubId: UUID
|
||||
rollId: UUID
|
||||
status: BackgroundCheckStatus
|
||||
}
|
||||
|
||||
class Vendor {
|
||||
id: UUID
|
||||
userId: String
|
||||
companyName: String
|
||||
}
|
||||
|
||||
class Business {
|
||||
id: UUID
|
||||
userId: String
|
||||
businessName: String
|
||||
}
|
||||
|
||||
class TeamMember {
|
||||
id: UUID
|
||||
teamId: UUID
|
||||
userId: String
|
||||
role: TeamMemberRole
|
||||
}
|
||||
|
||||
class ActivityLog {
|
||||
id: UUID
|
||||
userId: String
|
||||
activityType: ActivityType
|
||||
}
|
||||
|
||||
class UserConversation {
|
||||
conversationId: UUID
|
||||
userId: String
|
||||
}
|
||||
|
||||
class Conversation {
|
||||
id: UUID
|
||||
conversationType: ConversationType
|
||||
}
|
||||
|
||||
class Message{
|
||||
id: UUID
|
||||
conversationId: UUID
|
||||
content: String
|
||||
}
|
||||
|
||||
User <|-- Staff
|
||||
User <|-- Business
|
||||
User <|-- Vendor
|
||||
User <|-- TeamMember
|
||||
|
||||
|
||||
User "1" -- "*" ActivityLog : logs
|
||||
User "1" -- "*" UserConversation : participates in
|
||||
UserConversation "*" -- "1" Conversation : is part of
|
||||
Conversation "1" -- "*" Message : has
|
||||
@@ -0,0 +1,164 @@
|
||||
---
|
||||
config:
|
||||
layout: dagre
|
||||
---
|
||||
classDiagram
|
||||
direction TB
|
||||
class User {
|
||||
id: String
|
||||
email: String
|
||||
}
|
||||
|
||||
class Vendor {
|
||||
id: UUID
|
||||
userId: String
|
||||
companyName: String
|
||||
tier: VendorTier
|
||||
}
|
||||
|
||||
class Staff {
|
||||
id: UUID
|
||||
userId: String
|
||||
fullName: String
|
||||
}
|
||||
|
||||
class VendorBenefitPlan {
|
||||
id: UUID
|
||||
vendorId: UUID
|
||||
title: String
|
||||
}
|
||||
|
||||
class InvoiceTemplate {
|
||||
id: UUID
|
||||
name: String
|
||||
ownerId: UUID
|
||||
}
|
||||
|
||||
class VendorRate {
|
||||
id: UUID
|
||||
vendorId: UUID
|
||||
roleName: String
|
||||
}
|
||||
|
||||
class AttireOption{
|
||||
id: UUID
|
||||
vendorId: UUID
|
||||
}
|
||||
|
||||
class Team {
|
||||
id: UUID
|
||||
teamName: String
|
||||
ownerId: String
|
||||
}
|
||||
|
||||
class TeamMember {
|
||||
id: UUID
|
||||
teamId: UUID
|
||||
userId: String
|
||||
role: TeamMemberRole
|
||||
}
|
||||
|
||||
class TeamHub {
|
||||
id: UUID
|
||||
teamId: UUID
|
||||
hubName: String
|
||||
}
|
||||
|
||||
class Business {
|
||||
id: UUID
|
||||
userId: String
|
||||
businessName: String
|
||||
}
|
||||
|
||||
class ClientFeedback {
|
||||
id: UUID
|
||||
businessId: UUID
|
||||
vendorId: UUID
|
||||
rating: Int
|
||||
}
|
||||
|
||||
class Order {
|
||||
id: UUID
|
||||
vendorId: UUID
|
||||
businessId: UUID
|
||||
status: OrderStatus
|
||||
}
|
||||
|
||||
class Shift {
|
||||
id: UUID
|
||||
orderId: UUID
|
||||
status: ShiftStatus
|
||||
}
|
||||
|
||||
class Role {
|
||||
id: UUID
|
||||
name: String
|
||||
vendorId: UUID
|
||||
}
|
||||
|
||||
class ShiftRole {
|
||||
shiftId: UUID
|
||||
roleId: UUID
|
||||
}
|
||||
|
||||
class Workforce {
|
||||
id: UUID
|
||||
vendorId: UUID
|
||||
staffId: UUID
|
||||
status: WorkforceStatus
|
||||
}
|
||||
|
||||
class Application {
|
||||
id: UUID
|
||||
shiftId: UUID
|
||||
staffId: UUID
|
||||
roleId: UUID
|
||||
status: ApplicationStatus
|
||||
}
|
||||
|
||||
class Assignment {
|
||||
id: UUID
|
||||
workforceId: UUID
|
||||
shiftId: UUID
|
||||
roleId: UUID
|
||||
status: AssignmentStatus
|
||||
}
|
||||
|
||||
class Invoice {
|
||||
id: UUID
|
||||
vendorId: UUID
|
||||
businessId: UUID
|
||||
orderId: UUID
|
||||
status: InvoiceStatus
|
||||
}
|
||||
|
||||
class RecentPayment {
|
||||
id: UUID
|
||||
staffId: UUID
|
||||
applicationId: UUID
|
||||
invoiceId: UUID
|
||||
status: RecentPaymentStatus
|
||||
}
|
||||
|
||||
note for Vendor "All tables has relationship with vendor"
|
||||
|
||||
User "1" -- "1" Vendor : has
|
||||
Vendor "1" o-- "1" Staff : (ownerId)
|
||||
Vendor "1" -- "*" VendorBenefitPlan : offers
|
||||
Vendor "1" -- "*" AttireOption
|
||||
Vendor o-- InvoiceTemplate : (ownerId)
|
||||
Vendor "1" -- "*" VendorRate : has
|
||||
Vendor "1" -- "*" ClientFeedback : receives
|
||||
Vendor "1" -- "*" Order : receives
|
||||
Business "1" -- "*" Order : places
|
||||
Order "1" -- "*" Shift : contains
|
||||
Shift "1" -- "*" ShiftRole : requires
|
||||
Role "1" -- "*" ShiftRole : fills
|
||||
ShiftRole "1" -- "*" Application : receives
|
||||
Assignment "1" -- "1" ShiftRole
|
||||
Assignment "1" -- "1" Workforce
|
||||
Invoice "1" -- "1" Order
|
||||
Invoice "1" -- "*" RecentPayment : details
|
||||
Vendor "1" o-- "1" Team
|
||||
Team "1" -- "*" TeamHub : contains
|
||||
Team "1" -- "*" TeamMember : has
|
||||
Reference in New Issue
Block a user