import ApiModel from "~/models/ApiModel";
import {Bool, Str, Attr, Num, Uid} from "pinia-orm/dist/decorators";

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

  @Uid()
  declare id: number | string

  @Str(null)
  declare name: string|null

  @Str(null)
  declare acronym: string|null

  @Str(null)
  declare siretNumber: string|null

  @Str(null)
  declare apeNumber: string|null

  @Str(null)
  declare waldecNumber: string|null

  @Str(null)
  declare identifier: string|null

  @Str(null)
  declare ffecApproval: string|null

  @Str(null)
  declare description: string|null

  @Attr([])
  declare typeOfPractices: []

  @Str(null)
  declare otherPractice: string|null

  @Str(null)
  declare legalStatus: string|null

  @Str(null)
  declare principalType: string|null

  @Str(null)
  declare youngApproval: string|null

  @Str(null)
  declare trainingApproval: string|null

  @Str(null)
  declare otherApproval: string|null

  @Str(null)
  declare collectiveAgreement: string|null

  @Str(null)
  declare opca: string|null

  @Str(null)
  declare icomNumber: string|null

  @Str(null)
  declare urssafNumber: string|null

  @Str(null)
  declare twitter: string|null

  @Str(null)
  declare youtube: string|null

  @Str(null)
  declare facebook: string|null

  @Str(null)
  declare instagram: string|null

  @Bool(true, { notNullable: true })
  declare portailVisibility: boolean

  @Str(null)
  declare image: string|null

  @Str(null)
  declare creationDate: string|null

  @Str(null)
  declare prefectureName: string|null

  @Str(null)
  declare prefectureNumber: string|null

  @Str(null)
  declare declarationDate: string|null

  @Str(null)
  declare tvaNumber: string|null

  @Str(null)
  declare schoolCategory: string|null

  @Str(null)
  declare typeEstablishment: string|null

  @Str(null)
  declare typeEstablishmentDetail: string|null

  @Bool(false, { notNullable: true })
  declare isPerformanceContractor: boolean

  @Num(0)
  declare budget: number

  @Bool(false, { notNullable: true })
  declare isPedagogicIsPrincipalActivity: boolean

  @Num(0)
  declare pedagogicBudget: number

  @Str(null)
  declare logo: string|null
}
