/**
 * @aurora-catalyst-generated
 * @source cliter/o-auth/application-client.aurora.yaml
 */
import { OAuthApplicationFieldSchema } from '@app/o-auth/application';
import { OAuthClientFieldSchema } from '@app/o-auth/client';
import { FieldSchema } from '@aurorajs.dev/core-back';

/**
 * Field schema for OAuthApplicationClient, derived from cliter/o-auth/application-client.aurora.yaml.
 * Used by @Sanitize decorator, @Format decorator and @ApplySchema decorator.
 */
export const OAuthApplicationClientFieldSchema: FieldSchema[] = [
  {
    name: 'applicationId',
    type: 'id',
    nullable: false,
    maxLength: 36,
  },
  {
    name: 'application',
    type: 'relation',
    cardinality: 'one',
    target: () => OAuthApplicationFieldSchema,
  },
  {
    name: 'clientId',
    type: 'id',
    nullable: false,
    maxLength: 36,
  },
  {
    name: 'client',
    type: 'relation',
    cardinality: 'one',
    target: () => OAuthClientFieldSchema,
  },
];
