import { ContentDTO } from 'src/contents/dto/response/content.dto'; import { Season } from 'src/season/entities/season.entity'; export class SeasonDTO { id: string; projectId: string; seasonNumber: number; rentalPrice: number; title?: string; description?: string; isActive: boolean; createdAt: Date; updatedAt: Date; contents?: ContentDTO[]; constructor(season: Season) { this.id = season.id; this.projectId = season.projectId; this.seasonNumber = season.seasonNumber; this.rentalPrice = season.rentalPrice; this.title = season.title; this.description = season.description; this.isActive = season.isActive; this.createdAt = season.createdAt; this.updatedAt = season.updatedAt; this.contents = season?.contents?.map((content) => new ContentDTO(content)) || []; } }