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

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