import { type Base, genBase } from './_base'
import type { DivisionPosition } from './division-position'
export interface Division extends Base {
  code: string
  name: string
  parent_id?: number | null
  childrens?: Division[] | null

  // preload
  divisionPosition?: DivisionPosition[] | null
}

export function genDivision(): Division {
  return {
    ...genBase(),
    code: '',
    name: '',
    parent_id: null,
    childrens: null,
  }
}
