export type ContractType = 'CDI' | 'CDD' | 'STAGE' | 'ALTERNANCE' | 'AUTRE'

export type UserData = {
    id: number
    '@id'?: string
    username: string
    firstName?: string | null
    lastName?: string | null
    roles: string[]
    effectivePermissions?: string[]
    avatarUrl?: string | null
    apiToken?: string | null
    // Soft-delete flag: an archived user keeps its data but cannot log in
    archived?: boolean
    // HR / absence management
    isEmployee?: boolean
    hireDate?: string | null
    endDate?: string | null
    contractType?: ContractType | null
    workTimeRatio?: number
    annualLeaveDays?: number
    referencePeriodStart?: string
    initialLeaveBalance?: number
}

export type UserWrite = {
    username: string
    firstName?: string | null
    lastName?: string | null
    plainPassword?: string
    roles: string[]
    // HR / absence management
    isEmployee?: boolean
    hireDate?: string | null
    endDate?: string | null
    contractType?: ContractType | null
    workTimeRatio?: number
    annualLeaveDays?: number
    referencePeriodStart?: string
    initialLeaveBalance?: number
}
