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

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

  @ApiProperty({
    type: String,
    description:
      'ID of the associated access token. One-to-one relationship ensures each refresh token is tied to a specific access token instance.',
    example: 'b3e0958b-f617-5cf6-820e-c555fec6dfbf',
  })
  accessTokenId: string;

  @ApiProperty({
    type: String,
    description:
      'The refresh token string. JWT or opaque token value. SECURITY: Must be stored securely and treated as a sensitive credential. Used to request new access tokens.',
  })
  token: string;

  @ApiProperty({
    type: Boolean,
    description:
      'Indicates whether the refresh token has been revoked. Revoked tokens cannot be used to obtain new access tokens. Set to true on logout or security events.',
    example: true,
  })
  isRevoked: boolean;

  @ApiProperty({
    type: String,
    description:
      'Expiration timestamp for the refresh token. After this time, the token cannot be used to obtain new access tokens. NULL means no expiration (not recommended for security).',
  })
  expiresAt?: string;
}
