/**
 * @aurora-catalyst-generated
 * @source cliter/o-auth/application.aurora.yaml
 */
import { ApiProperty } from '@nestjs/swagger';

export class OAuthCreateApplicationDto {
  @ApiProperty({
    type: String,
    description:
      'Unique identifier for the application. UUID v4 format, generated automatically on creation.',
  })
  id: string;

  @ApiProperty({
    type: String,
    description:
      'Unique code identifier for the application. Used as the client_id in OAuth flows. Convention: Lowercase, hyphen-separated (e.g., my-app, mobile-client).',
  })
  code: string;

  @ApiProperty({
    type: String,
    description:
      'Human-readable name for the application. Displayed in authorization prompts and admin interfaces.',
  })
  name: string;

  @ApiProperty({
    type: String,
    description:
      'Application secret used for authentication. SECURITY: Must be stored securely, hashed, and never exposed to clients. Used as client_secret in confidential OAuth flows.',
  })
  secret: string;

  @ApiProperty({
    type: Boolean,
    description:
      'Indicates whether this is a master application with elevated privileges. Master applications typically have access to all scopes and bypass certain restrictions.',
  })
  isMaster: boolean;

  @ApiProperty({
    type: [String],
    description:
      'Many-to-many relationship with OAuth clients. An application can have multiple clients representing different grant types or deployment environments.',
  })
  clientIds?: string[];
}
