import {
  AddressSchema,
  EntityContainerSchema,
  EntitySchema,
  LabelSchema,
} from '@isa/common/data-access';
import { number, z } from 'zod';

export const BranchSchema = z
  .object({
    address: AddressSchema.describe('Address').optional(),
    banchNumber: z.string().describe('Banch number').optional(),
    branchType: z.number().describe('Branch type'),
    isOnline: z.boolean().describe('Whether online').optional(),
    key: z.string().describe('Key').optional(),
    label: EntityContainerSchema(LabelSchema).describe('Label').optional(),
    name: z.string().describe('Name').optional(),
    parent: z.number().describe('Parent').optional(),
    shortName: z.string().describe('Short name').optional(),
  })
  .extend(EntitySchema.shape);
