feat: Complete NestJS backend scaffold — 22 modules, 39 entities, WebSocket gateway
All checks were successful
Test Asgard Runner / test (push) Successful in 3s
All checks were successful
Test Asgard Runner / test (push) Successful in 3s
Full backend rewrite from Rust/Axum to NestJS/TypeScript. - 22 feature modules (auth, servers, wipes, maps, plugins, players, console, chat, team, notifications, settings, schedules, analytics, alerts, status, store, webstore, admin, setup, migration, users, licenses) - 39 TypeORM entities matching PostgreSQL schema (12 migrations) - Common infrastructure: JWT/RBAC guards, decorators, exception filter - NATS service with pub/sub/request-reply - Socket.IO WebSocket gateway with NATS bridge - Docker: NestJS Dockerfile + updated docker-compose.yml - Zero compile errors (npx tsc --noEmit clean) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
45
backend-nest/src/entities/chat-log.entity.ts
Normal file
45
backend-nest/src/entities/chat-log.entity.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Check } from 'typeorm';
|
||||
import { License } from './license.entity';
|
||||
import { User } from './user.entity';
|
||||
|
||||
@Entity('chat_logs')
|
||||
@Check(`"channel" IN ('global', 'team', 'server')`)
|
||||
export class ChatLog {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
id: string;
|
||||
|
||||
@Column({ type: 'uuid' })
|
||||
license_id: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 20 })
|
||||
steam_id: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 100 })
|
||||
player_name: string;
|
||||
|
||||
@Column({ type: 'varchar', length: 20, default: 'global' })
|
||||
channel: string;
|
||||
|
||||
@Column({ type: 'text' })
|
||||
message: string;
|
||||
|
||||
@Column({ type: 'boolean', default: false })
|
||||
flagged: boolean;
|
||||
|
||||
@Column({ type: 'uuid', nullable: true })
|
||||
flagged_by: string | null;
|
||||
|
||||
@Column({ type: 'text', nullable: true })
|
||||
flag_reason: string | null;
|
||||
|
||||
@Column({ type: 'timestamptz', default: () => 'NOW()' })
|
||||
created_at: Date;
|
||||
|
||||
@ManyToOne(() => License, { onDelete: 'CASCADE' })
|
||||
@JoinColumn({ name: 'license_id' })
|
||||
license: License;
|
||||
|
||||
@ManyToOne(() => User, { nullable: true })
|
||||
@JoinColumn({ name: 'flagged_by' })
|
||||
flagger: User | null;
|
||||
}
|
||||
Reference in New Issue
Block a user