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

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

  @Uid()
  declare id: number

  @Str(null)
  declare name: string | null

  @Str(null)
  declare surname: string | null

  @Str(null)
  declare phone: string | null

  @Str(null)
  declare email: string | null

  @Attr(null)
  declare resume: object | null

  @Attr(null)
  declare motivationLetter: object | null

  @Str(null)
  declare message: string | null

  @Num(null)
  declare jobPostingId: number | null
}
