- Added a new `api` service for the NestJS backend, including health checks and dependencies on PostgreSQL, Redis, and MinIO. - Introduced PostgreSQL and Redis services with health checks and configurations for data persistence. - Added MinIO for S3-compatible object storage and a one-shot service to initialize required buckets. - Updated the Nginx configuration to proxy requests to the new backend API and MinIO storage. - Enhanced the Dockerfile to support the new API environment variables and configurations. - Updated the `package.json` and `package-lock.json` to include new dependencies for QR code generation and other utilities. Co-authored-by: Cursor <cursoragent@cursor.com>
30 lines
837 B
TypeScript
30 lines
837 B
TypeScript
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)) || [];
|
|
}
|
|
}
|