File

apps/recallassess/recallassess-api/src/api/client/subscription/dto/subscription-package.dto.ts

Description

GET /api/client/subscription/packages — client-safe package card fields only. enrichPackage spreads the full Prisma Package row; toDtoArray + this DTO keep only exposed fields.

Index

Properties

Properties

badge
Type : string
Decorators :
@Expose()
@ApiProperty()
color
Type : string
Decorators :
@Expose()
@ApiProperty()
description
Type : string | null
Decorators :
@Expose()
@ApiPropertyOptional({nullable: true})
icon
Type : string
Decorators :
@Expose()
@ApiProperty()
id
Type : number
Decorators :
@Expose()
@ApiProperty()
is_current
Type : boolean
Decorators :
@Expose()
@ApiProperty()
is_trial_package
Type : boolean
Decorators :
@Expose()
@ApiProperty()
license_count_end
Type : number
Decorators :
@Expose()
@ApiProperty()
license_count_start
Type : number
Decorators :
@Expose()
@ApiProperty()
minimum_license_required
Type : number
Decorators :
@Expose()
@ApiProperty()
name
Type : string
Decorators :
@Expose()
@ApiProperty()
package_type
Type : string
Decorators :
@Expose()
@ApiProperty()
price_display
Type : string | null
Decorators :
@Expose()
@ApiPropertyOptional({nullable: true})
price_per_licence
Type : number | null
Decorators :
@Expose()
@ApiPropertyOptional({nullable: true})
price_prefix
Type : string | null
Decorators :
@Expose()
@ApiPropertyOptional({nullable: true})
price_suffix
Type : string | null
Decorators :
@Expose()
@ApiPropertyOptional({nullable: true})
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { Exclude, Expose } from "class-transformer";

/**
 * GET /api/client/subscription/packages — client-safe package card fields only.
 * `enrichPackage` spreads the full Prisma `Package` row; `toDtoArray` + this DTO keep only exposed fields.
 */
@Exclude()
export class SubscriptionPackageDto {
  @Expose()
  @ApiProperty()
  id!: number;

  @Expose()
  @ApiProperty()
  package_type!: string;

  @Expose()
  @ApiProperty()
  name!: string;

  @Expose()
  @ApiPropertyOptional({ nullable: true })
  description!: string | null;

  @Expose()
  @ApiPropertyOptional({ nullable: true })
  price_per_licence!: number | null;

  @Expose()
  @ApiPropertyOptional({ nullable: true })
  price_display!: string | null;

  @Expose()
  @ApiPropertyOptional({ nullable: true })
  price_prefix!: string | null;

  @Expose()
  @ApiPropertyOptional({ nullable: true })
  price_suffix!: string | null;

  @Expose()
  @ApiProperty()
  license_count_start!: number;

  @Expose()
  @ApiProperty()
  license_count_end!: number;

  @Expose()
  @ApiProperty()
  minimum_license_required!: number;

  @Expose()
  @ApiProperty()
  color!: string;

  @Expose()
  @ApiProperty()
  icon!: string;

  @Expose()
  @ApiProperty()
  badge!: string;

  @Expose()
  @ApiProperty()
  is_current!: boolean;

  @Expose()
  @ApiProperty()
  is_trial_package!: boolean;
}

results matching ""

    No results matching ""