/**
 * @aurora-catalyst-generated
 * @source cliter/iam/role-account.aurora.yaml
 */
import { IamAccountFieldSchema } from '@app/iam/account';
import { IamRoleFieldSchema } from '@app/iam/role';
import { FieldSchema } from '@aurorajs.dev/core-back';

/**
 * Field schema for IamRoleAccount, derived from cliter/iam/role-account.aurora.yaml.
 * Used by @Sanitize decorator, @Format decorator and @ApplySchema decorator.
 */
export const IamRoleAccountFieldSchema: FieldSchema[] = [
  {
    name: 'roleId',
    type: 'id',
    nullable: false,
    maxLength: 36,
  },
  {
    name: 'role',
    type: 'relation',
    cardinality: 'one',
    target: () => IamRoleFieldSchema,
  },
  {
    name: 'accountId',
    type: 'id',
    nullable: false,
    maxLength: 36,
  },
  {
    name: 'account',
    type: 'relation',
    cardinality: 'one',
    target: () => IamAccountFieldSchema,
  },
];
