import type { AppointmentHistory, AppointmentType, Assignment, EmploymentType, JobProfile, Position, Schema, Worker, WorkerEmployment, WorkRegime, WorkSchedule, } from "../lib/types"; import type { Company, Department, Site } from "./moduleMocks"; export const baseWorker = { id: "worker-1", userId: "user-1", workerCode: "W-0001", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies Worker; export const secondWorker = { id: "worker-2", userId: "user-2", workerCode: "W-0002", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies Worker; export const baseDepartment = { id: "department-1", code: "DEPT-001", name: "Engineering", companyId: "company-1", parentDepartmentId: null, status: "ACTIVE", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies Department; export const secondDepartment = { id: "department-2", code: "DEPT-002", name: "Sales", companyId: "company-1", parentDepartmentId: null, status: "ACTIVE", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies Department; export const baseSite = { id: "site-1", name: "Head Office", type: "OFFICE", companyId: "company-1", street: "1-1-1 Marunouchi", city: "Chiyoda-ku", state: "Tokyo", postalCode: "100-0005", country: "JP", timezone: "Asia/Tokyo", status: "ACTIVE", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies Site; export const baseCompany = { id: "company-1", legalName: "Base Legal Entity", taxId: null, registrationNumber: null, baseCurrencyId: null, street: null, city: null, state: null, postalCode: null, country: null, status: "ACTIVE", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies Company; export const baseJobProfile = { id: "job-profile-1", code: "JP-001", jobFamily: "Engineering", gradeReference: "G3", requirements: "3+ years of experience", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies JobProfile; export const secondJobProfile = { id: "job-profile-2", code: "JP-002", jobFamily: "Sales", gradeReference: "G2", requirements: "1+ years of experience", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies JobProfile; export const basePosition = { id: "position-1", departmentId: "department-1", siteId: "site-1", jobProfileId: baseJobProfile.id, headcount: 1, effectiveStart: new Date("2024-01-01T00:00:00.000Z"), effectiveEnd: null, versionOf: "position-1", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies Position; export const destinationPosition = { id: "position-2", departmentId: "department-1", siteId: "site-1", jobProfileId: baseJobProfile.id, headcount: 1, effectiveStart: new Date("2024-01-01T00:00:00.000Z"), effectiveEnd: null, versionOf: "position-2", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies Position; export const baseWorkerEmployment = { id: "worker-employment-1", workerId: baseWorker.id, companyId: "company-1", // References baseEmploymentType / baseWorkRegime (defined below); hardcoded to avoid a // top-of-module temporal-dead-zone forward reference. employmentTypeId: "employment-type-1", workRegimeId: "work-regime-1", hireDate: new Date("2024-01-01T00:00:00.000Z"), terminationDate: null, effectiveStart: new Date("2024-01-01T00:00:00.000Z"), effectiveEnd: null, versionOf: "worker-employment-1", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies WorkerEmployment; export const secondWorkerEmployment = { id: "worker-employment-2", workerId: secondWorker.id, companyId: "company-1", employmentTypeId: "employment-type-1", workRegimeId: "work-regime-1", hireDate: new Date("2024-01-01T00:00:00.000Z"), terminationDate: null, effectiveStart: new Date("2024-01-01T00:00:00.000Z"), effectiveEnd: null, versionOf: "worker-employment-2", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies WorkerEmployment; export const baseAssignment = { id: "assignment-1", workerEmploymentId: baseWorkerEmployment.id, positionId: basePosition.id, isPrimary: true, effectiveStart: new Date("2024-01-01T00:00:00.000Z"), effectiveEnd: null, versionOf: "assignment-1", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies Assignment; export const baseWorkSchedule = { id: "work-schedule-1", assignmentId: baseAssignment.id, scheduledDailyMinutes: 480, scheduledWeeklyMinutes: 2400, effectiveStart: new Date("2024-01-01T00:00:00.000Z"), effectiveEnd: null, versionOf: "work-schedule-1", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies WorkSchedule; export const baseEmploymentType = { id: "employment-type-1", companyId: "company-1", key: "FULL_TIME", displayName: "Full-time", status: "ACTIVE", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies EmploymentType; export const baseWorkRegime = { id: "work-regime-1", companyId: "company-1", key: "FLEX", displayName: "Flex-time", status: "ACTIVE", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies WorkRegime; // HIRE catalog entry (CREATE_PRIMARY_ASSIGNMENT action) in company-1. export const baseAppointmentType = { id: "appointment-type-1", companyId: "company-1", key: "HIRE", displayName: "Hire", action: "CREATE_PRIMARY_ASSIGNMENT", status: "ACTIVE", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies AppointmentType; // TRANSFER catalog entry (CHANGE_ASSIGNMENT action) in company-1. export const transferAppointmentType = { id: "appointment-type-2", companyId: "company-1", key: "TRANSFER", displayName: "Transfer", action: "CHANGE_ASSIGNMENT", status: "ACTIVE", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies AppointmentType; // CONCURRENT catalog entry (CREATE_SECONDARY_ASSIGNMENT action) in company-1. export const concurrentAppointmentType = { id: "appointment-type-3", companyId: "company-1", key: "CONCURRENT", displayName: "Concurrent", action: "CREATE_SECONDARY_ASSIGNMENT", status: "ACTIVE", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies AppointmentType; // TERMINATION catalog entry (END_ASSIGNMENT action) in company-1. export const terminationAppointmentType = { id: "appointment-type-4", companyId: "company-1", key: "TERMINATION", displayName: "Termination", action: "END_ASSIGNMENT", status: "ACTIVE", createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies AppointmentType; export const baseAppointmentHistory = { id: "appointment-1", workerId: baseWorker.id, assignmentId: baseAssignment.id, fromPositionId: null, toPositionId: basePosition.id, appointmentTypeId: baseAppointmentType.id, effectiveDate: new Date("2024-01-01T00:00:00.000Z"), issuedAt: new Date("2024-01-01T00:00:00.000Z"), appliedAt: new Date("2024-01-01T00:00:00.000Z"), createdAt: new Date("2024-01-01T00:00:00.000Z"), updatedAt: new Date("2024-01-01T00:00:00.000Z"), } as const satisfies AppointmentHistory;