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>
37 lines
984 B
TypeScript
37 lines
984 B
TypeScript
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, Unique } from 'typeorm';
|
|
import { Host } from './host.entity';
|
|
import { License } from './license.entity';
|
|
|
|
@Entity('host_licenses')
|
|
@Unique(['host_id', 'license_id'])
|
|
export class HostLicense {
|
|
@PrimaryGeneratedColumn('uuid')
|
|
id: string;
|
|
|
|
@Column({ type: 'uuid' })
|
|
host_id: string;
|
|
|
|
@Column({ type: 'uuid' })
|
|
license_id: string;
|
|
|
|
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
server_identifier: string | null;
|
|
|
|
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
customer_email: string | null;
|
|
|
|
@Column({ type: 'timestamptz', default: () => 'NOW()' })
|
|
provisioned_at: Date;
|
|
|
|
@Column({ type: 'timestamptz', nullable: true })
|
|
last_seen_at: Date | null;
|
|
|
|
@ManyToOne(() => Host, { onDelete: 'CASCADE' })
|
|
@JoinColumn({ name: 'host_id' })
|
|
host: Host;
|
|
|
|
@ManyToOne(() => License, { onDelete: 'CASCADE' })
|
|
@JoinColumn({ name: 'license_id' })
|
|
license: License;
|
|
}
|