import AddressPostal from '~/models/Core/AddressPostal'
import ApiModel from "~/models/ApiModel";
import {HasOne, Str, Uid} from "pinia-orm/dist/decorators";

/**
 * AP2i Model : OrganizationAddressPostal
 *
 * @see https://gitlab.2iopenservice.com/opentalent/ap2i/-/blob/develop/src/Entity/Organization/OrganizationAddressPostal.php
 */
export default class OrganizationAddressPostal extends ApiModel {
  static entity = 'organization_address_postals'

  @Uid()
  declare id: number | string | null

  @HasOne(() => AddressPostal, 'organizationAddressPostalId')
  declare addressPostal: AddressPostal | null

  @Str('ADDRESS_HEAD_OFFICE', { notNullable: true })
  declare type: string
}
