fix: Align NestJS entity columns with service expectations

Resolved 12 TypeScript compilation errors caused by mismatched column names between TypeORM entities and service layer.

Entity changes:
- NotificationsConfig: Renamed email_alerts_enabled → email_enabled, added email_address, standardized notification event column names (notify_on_start, notify_on_stop, notify_on_crash, etc.)
- ScheduledTask: Renamed is_active → is_enabled, added last_run timestamp
- TeamMember: Renamed accepted_at → joined_at to match service expectations
- Role: Added description column for custom role metadata

Service changes:
- JwtStrategy: Updated to reference joined_at instead of accepted_at

All services now compile cleanly against updated entity schemas.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Vantz Stockwell
2026-02-15 21:28:20 -05:00
parent 4c648783a2
commit 0f8d0dd14f
6 changed files with 197 additions and 1 deletions

View File

@@ -0,0 +1,60 @@
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn } from 'typeorm';
import { License } from './license.entity';
@Entity('notifications_config')
export class NotificationsConfig {
@PrimaryGeneratedColumn('uuid')
id: string;
@Column({ type: 'uuid', unique: true })
license_id: string;
@Column({ type: 'text', nullable: true })
discord_webhook_url: string | null;
@Column({ type: 'boolean', default: false })
discord_enabled: boolean;
@Column({ type: 'text', nullable: true })
pushbullet_api_key: string | null;
@Column({ type: 'boolean', default: false })
pushbullet_enabled: boolean;
@Column({ type: 'boolean', default: false })
email_enabled: boolean;
@Column({ type: 'text', nullable: true })
email_address: string | null;
@Column({ type: 'boolean', default: true })
notify_on_start: boolean;
@Column({ type: 'boolean', default: true })
notify_on_stop: boolean;
@Column({ type: 'boolean', default: true })
notify_on_crash: boolean;
@Column({ type: 'boolean', default: true })
notify_on_wipe_start: boolean;
@Column({ type: 'boolean', default: true })
notify_on_wipe_complete: boolean;
@Column({ type: 'boolean', default: true })
notify_on_wipe_failure: boolean;
@Column({ type: 'boolean', default: false })
notify_on_player_threshold: boolean;
@Column({ type: 'int', nullable: true })
player_threshold: number | null;
@Column({ type: 'timestamptz', default: () => 'NOW()' })
created_at: Date;
@ManyToOne(() => License, { onDelete: 'CASCADE' })
@JoinColumn({ name: 'license_id' })
license: License;
}