Files
Krow-workspace/dataconnect/schema/staff.gql
2025-12-17 11:58:19 -05:00

86 lines
2.3 KiB
GraphQL

enum EmploymentType {
FULL_TIME
PART_TIME
ON_CALL
WEEKENDS
SPECIFIC_DAYS
SEASONAL
MEDICAL_LEAVE
}
enum StaffDepartment {
OPERATIONS
SALES
HR
FINANCE
IT
MARKETING
CUSTOMER_SERVICE
LOGISTICS
}
enum ProfileType {
SKILLED
BEGINNER
CROSS_TRAINED
}
enum EnglishLevel {
FLUENT
INTERMEDIATE
BASIC
NONE
}
enum BackgroundCheckStatus {
PENDING
CLEARED
FAILED
EXPIRED
NOT_REQUIRED
}
type Staff @table(name: "staffs") {
id: UUID! @default(expr: "uuidV4()")
employeeName: String! @col(name: "employee_name")
initial:String@col(name:"initial") # nuevo
vendorId: String @default(expr: "auth.uid")#String @col(name: "vendor_id") # vendor_id (FK lógica a Vendor.id)
vendorName: String @col(name: "vendor_name")
manager: String
contactNumber: String @col(name: "contact_number")
phone: String @col(name:"phone") # nuevo
email: String
department: StaffDepartment
hubLocation: String @col(name: "hub_location")
eventLocation:String@col(name:"event_location") # nuevo
address:String@col(name:"address") # nuevo
city:String@col(name:"city") # nuevo
track: String
position: String
position2: String @col(name:"position_2") # nuevo
profileType: ProfileType @col(name: "profile_type")
employmentType: EmploymentType @col(name: "employment_type")
english: EnglishLevel
rate: Float
rating: Float
reliabilityScore: Int @col(name: "reliability_score")
backgroundCheckStatus: BackgroundCheckStatus @col(name: "background_check_status")
notes: String
accountingComments: String @col(name:"accounting_comments") # nuevo
shiftCoveragePercentage: Int @col(name:"shift_coverage_percentage") # nuevo
cancellationCount: Int @col(name:"cancellation_count") # nuevo
noShowCount: Int @col(name:"no_show_count") # nuevo
totalShifts: Int @col(name:"total_shifts") # nuevo
invoiced: Boolean @default(expr:"false") # nuevo
englishRequired: Boolean @col(name:"english_required")@default(expr:"false") # nuevo
checkIn: String @col(name:"check_in") # nuevo
scheduleDays: String @col(name:"schedule_days") # nuevo
replacedBy: String @col(name:"replaced_by") # nuevo
action: String # nuevo
ro: String # nuevo
mon: String # nuevo
createdDate: Timestamp @default(expr: "request.time")
updatedDate: Timestamp @default(expr: "request.time")
createdBy: String @default(expr: "auth.uid")
}