Implement backend API and database services in Docker setup
- 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>
This commit is contained in:
49
backend/src/contents/entities/cast.entity.ts
Normal file
49
backend/src/contents/entities/cast.entity.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import { Filmmaker } from 'src/filmmakers/entities/filmmaker.entity';
|
||||
import {
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
Entity,
|
||||
JoinColumn,
|
||||
ManyToOne,
|
||||
PrimaryColumn,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm';
|
||||
import { Content } from './content.entity';
|
||||
|
||||
@Entity('casts')
|
||||
export class Cast {
|
||||
@PrimaryColumn()
|
||||
id: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
filmmakerId?: string;
|
||||
|
||||
@PrimaryColumn()
|
||||
contentId: string;
|
||||
|
||||
@Column({ nullable: true })
|
||||
placeholderName: string;
|
||||
|
||||
@Column()
|
||||
character: string;
|
||||
|
||||
@Column()
|
||||
order: number;
|
||||
|
||||
@Column({ nullable: true })
|
||||
email: string;
|
||||
|
||||
@CreateDateColumn({ type: 'timestamptz' })
|
||||
createdAt: Date;
|
||||
|
||||
@UpdateDateColumn({ type: 'timestamptz' })
|
||||
updatedAt: Date;
|
||||
|
||||
@ManyToOne(() => Filmmaker, (filmmaker) => filmmaker.castFilms)
|
||||
@JoinColumn({ name: 'filmmaker_id' })
|
||||
filmmaker: Filmmaker;
|
||||
|
||||
@ManyToOne(() => Content, (content) => content.cast)
|
||||
@JoinColumn({ name: 'content_id' })
|
||||
content: Content;
|
||||
}
|
||||
Reference in New Issue
Block a user