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

/**
 * Maestro Model : JobPosting
 *
 * @see https://gitlab.2iopenservice.com/opentalent/maestro/-/blob/master/src/Entity/JobPosting/JobPosting.php?ref_type=heads
 */
export default class JobPosting extends ApiModel {
  static entity = 'public/job_postings'

  @Uid()
  declare id: number

  @Str(null)
  declare type: string | null

  @Str(null)
  declare contractType: string | null

  @Str(null)
  declare title: string | null

  @Str(null)
  declare startPublication: string | null

  @Str(null)
  declare updatedAt: string | null

  @Str(null)
  declare endPublication: string | null

  @Str(null)
  declare city: string | null

  @Str(null)
  declare postalCode: string | null

  @Str(null)
  declare content: string | null

  @Bool(false)
  declare featured: boolean

  @Attr([])
  declare sector: string | null[]

  @Attr([])
  declare tags: string[]

  @Str(null)
  declare structureName: string | null

  @Str(null)
  declare structureNameText: string

  @Str(null)
  declare structureInfo: string | null

  @Bool(false)
  declare clientOpentalent: boolean
}
