refactor(server): enums (#11809)

This commit is contained in:
Jason Rasmussen
2024-08-15 06:57:01 -04:00
committed by GitHub
parent fa64277476
commit b288241a5c
82 changed files with 242 additions and 207 deletions
@@ -1,4 +1,5 @@
import { SystemConfig } from 'src/config';
import { SystemMetadataKey } from 'src/enum';
import { Column, DeepPartial, Entity, PrimaryColumn } from 'typeorm';
@Entity('system_metadata')
@@ -10,15 +11,6 @@ export class SystemMetadataEntity<T extends keyof SystemMetadata = SystemMetadat
value!: SystemMetadata[T];
}
export enum SystemMetadataKey {
REVERSE_GEOCODING_STATE = 'reverse-geocoding-state',
FACIAL_RECOGNITION_STATE = 'facial-recognition-state',
ADMIN_ONBOARDING = 'admin-onboarding',
SYSTEM_CONFIG = 'system-config',
VERSION_CHECK_STATE = 'version-check-state',
LICENSE = 'license',
}
export type VersionCheckMetadata = { checkedAt: string; releaseVersion: string };
export interface SystemMetadata extends Record<SystemMetadataKey, Record<string, any>> {