import vine from '@vinejs/vine';
export const staffValidator = vine.compile(vine.object({
    id: vine.number().exists({ table: 'staff', column: 'id' }).optional(),
    document: vine.string().maxLength(30).minLength(5),
    firstName: vine.string().maxLength(100).minLength(1),
    lastName: vine.string().maxLength(100).minLength(1),
    role: vine.enum(['admin', 'operator', 'partner', 'driver']),
    phone: vine.string().maxLength(20).minLength(5).optional(),
    address: vine.string().maxLength(200).minLength(1).optional(),
    status: vine.number().range([0, 1]).optional(),
    email: vine.string().email(),
    partner: vine.array(vine.object({
        groupId: vine.number().exists({ table: 'groups', column: 'id' }),
        share: vine.number().range([0.01, 100000000]),
    })).optional(),
    driver: vine.object({}).allowUnknownProperties().optional()
}));
export const staffDriverValidator = vine.compile(vine.object({
    id: vine.number().exists({ table: 'staff', column: 'id' }).optional(),
    document: vine.string().maxLength(30).minLength(5),
    firstName: vine.string().maxLength(100).minLength(1),
    lastName: vine.string().maxLength(100).minLength(1),
    role: vine.enum(['driver']),
    phone: vine.string().maxLength(20).minLength(5).optional(),
    address: vine.string().maxLength(200).minLength(1).optional(),
    status: vine.number().range([0, 1]).optional(),
    email: vine.string().email(),
    driver: vine.object({}).allowUnknownProperties().optional()
}));
//# sourceMappingURL=staff.js.map