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

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

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

  @Str(null)
  declare bankName: string|null

  @Str(null)
  declare bic: string|null

  @Str(null)
  declare bicInvalid: string|null

  @Str(null)
  declare iban: string|null

  @Str(null)
  declare ibanInvalid: string|null

  @Str(null)
  declare debitAddress: string|null

  @Str(null)
  declare holder: string|null

  @Bool(false)
  declare principal: boolean

  @Attr([])
  declare organization: []
}
