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

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

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

  @Str('')
  declare name: string

  @Str('')
  declare imgFieldName: string

  @Str('')
  declare visibility: string

  @Str('')
  declare config: string

  @Str('')
  declare folder: string

  @Num(null)
  declare ownerId: number

  @Str('')
  declare status: 'PENDING' | 'READY' | 'ERROR'
}
