File

apps/recallassess/recallassess-api/src/api/client/course/dto/course.dto.ts

Description

DTO for client-facing course data This includes both database fields and enriched frontend-specific fields

Index

Properties

Properties

category
Type : string
Decorators :
@Expose()
Optional course_code
Type : string
Decorators :
@Expose()
Optional course_detail_url
Type : string | null
Decorators :
@Expose()
Optional course_enrolled_override_text
Type : string | null
Decorators :
@Expose()
description
Type : string
Decorators :
@Expose()
duration
Type : string | null
Decorators :
@Expose()
enrolled
Type : number
Decorators :
@Expose()
id
Type : number
Decorators :
@Expose()
image
Type : string
Decorators :
@Expose()
image_alt
Type : string
Decorators :
@Expose()
Optional is_featured
Type : boolean
Decorators :
@Expose()
Optional is_published
Type : boolean
Decorators :
@Expose()
level
Type : string
Decorators :
@Expose()
level_color
Type : string
Decorators :
@Expose()
modules
Type : number
Decorators :
@Expose()
short_description
Type : string
Decorators :
@Expose()
Optional testimonials_url
Type : string | null
Decorators :
@Expose()
title
Type : string
Decorators :
@Expose()
import { Exclude, Expose } from "class-transformer";

/**
 * DTO for client-facing course data
 * This includes both database fields and enriched frontend-specific fields
 */
@Exclude()
export class CLCourseDto {
  @Expose()
  id!: number;

  @Expose()
  title!: string;

  @Expose()
  category!: string;

  @Expose()
  level!: string;

  @Expose()
  level_color!: string;

  @Expose()
  description!: string;

  @Expose()
  short_description!: string;

  @Expose()
  modules!: number;

  @Expose()
  duration!: string | null;

  @Expose()
  enrolled!: number;

  @Expose()
  image!: string;

  @Expose()
  image_alt!: string;

  @Expose()
  course_code?: string;

  @Expose()
  is_published?: boolean;

  @Expose()
  is_featured?: boolean;

  @Expose()
  course_detail_url?: string | null;

  @Expose()
  testimonials_url?: string | null;

  @Expose()
  course_enrolled_override_text?: string | null;
}

results matching ""

    No results matching ""