Files
Krow-workspace/backend/dataconnect/schema/staff.gql
2026-02-11 15:55:53 -05:00

103 lines
1.6 KiB
GraphQL

enum BackgroundCheckStatus {
PENDING
CLEARED
FAILED
EXPIRED
NOT_REQUIRED
}
enum EmploymentType {
FULL_TIME
PART_TIME
ON_CALL
WEEKENDS
SPECIFIC_DAYS
SEASONAL
MEDICAL_LEAVE
}
enum DepartmentType {
OPERATIONS
SALES
HR
FINANCE
IT
MARKETING
CUSTOMER_SERVICE
LOGISTICS
}
enum EnglishProficiency {
FLUENT
INTERMEDIATE
BASIC
NONE
}
type Staff @table(name: "staffs") {
id: UUID! @default(expr: "uuidV4()")
userId: String!
# Identity
fullName: String!
level: String
role: String
phone: String
email: String
photoUrl: String
# Metrics
totalShifts: Int
averageRating: Float
onTimeRate: Int
noShowCount: Int
cancellationCount: Int
reliabilityScore: Int
# Gamification
xp: Int @default(expr: "0")
badges: Any
# Profile
bio: String
skills: [String] #changed it for staffRole
industries: [String]
preferredLocations: [String]
maxDistanceMiles: Int
languages: Any
itemsAttire: Any
# Recommendation
isRecommended: Boolean @default(expr: "false")
# Relations / ownership
ownerId: UUID #vendor/business
# web
department: DepartmentType
hubId: UUID
manager: UUID
english: EnglishProficiency
backgroundCheckStatus: BackgroundCheckStatus
employmentType: EmploymentType
initial: String
englishRequired: Boolean @default(expr: "false")
addres: String
placeId: String
latitude: Float
longitude: Float
city: String
state: String
street: String
country: String
zipCode: String
createdAt: Timestamp @default(expr: "request.time")
updatedAt: Timestamp @default(expr: "request.time")
createdBy: String
}