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:
41
backend/src/trailers/entities/trailer.entity.ts
Normal file
41
backend/src/trailers/entities/trailer.entity.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import {
|
||||
Column,
|
||||
CreateDateColumn,
|
||||
Entity,
|
||||
OneToMany,
|
||||
PrimaryGeneratedColumn,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm';
|
||||
import { ContentStatus } from 'src/contents/enums/content-status.enum';
|
||||
import { Content } from 'src/contents/entities/content.entity';
|
||||
import { Project } from 'src/projects/entities/project.entity';
|
||||
|
||||
@Entity('trailers')
|
||||
export class Trailer {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column()
|
||||
file: string;
|
||||
|
||||
@Column({
|
||||
type: 'varchar',
|
||||
default: 'processing',
|
||||
})
|
||||
status: ContentStatus;
|
||||
|
||||
@Column('json', { nullable: true })
|
||||
metadata?: any;
|
||||
|
||||
@CreateDateColumn({ type: 'timestamptz', name: 'created_at' })
|
||||
createdAt: Date;
|
||||
|
||||
@UpdateDateColumn({ type: 'timestamptz', name: 'updated_at' })
|
||||
updatedAt: Date;
|
||||
|
||||
@OneToMany(() => Content, (content) => content.trailer)
|
||||
contents: Content[];
|
||||
|
||||
@OneToMany(() => Project, (project) => project.trailer)
|
||||
projects: Project[];
|
||||
}
|
||||
Reference in New Issue
Block a user