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

/**
 * Field schema for OAuthScope, derived from cliter/o-auth/scope.aurora.yaml.
 * Used by @Sanitize decorator, @Format decorator and @ApplySchema decorator.
 */
export const OAuthScopeFieldSchema: FieldSchema[] = [
  {
    name: 'id',
    type: 'id',
    nullable: false,
    maxLength: 36,
  },
  {
    name: 'code',
    type: 'varchar',
    nullable: false,
    maxLength: 64,
    rules: { minLength: 1 },
  },
  {
    name: 'name',
    type: 'varchar',
    nullable: false,
    maxLength: 128,
    rules: { minLength: 1 },
  },
  {
    name: 'roleIds',
    type: 'array',
    nullable: true,
  },
  {
    name: 'createdAt',
    type: 'timestamp',
    nullable: true,
  },
  {
    name: 'updatedAt',
    type: 'timestamp',
    nullable: true,
  },
  {
    name: 'deletedAt',
    type: 'timestamp',
    nullable: true,
  },
];
