2023-03-30 15:38:55 -04:00
|
|
|
import { SystemConfig } from '@app/infra/entities';
|
2023-04-03 06:24:18 +02:00
|
|
|
import { Type } from 'class-transformer';
|
|
|
|
import { IsObject, ValidateNested } from 'class-validator';
|
2022-12-09 15:51:42 -05:00
|
|
|
import { SystemConfigFFmpegDto } from './system-config-ffmpeg.dto';
|
2023-06-16 15:54:17 -04:00
|
|
|
import { SystemConfigJobDto } from './system-config-job.dto';
|
2023-08-25 00:15:03 -04:00
|
|
|
import { SystemConfigMachineLearningDto } from './system-config-machine-learning.dto';
|
2023-09-08 22:51:46 -04:00
|
|
|
import { SystemConfigMapDto } from './system-config-map.dto';
|
2023-10-24 17:05:42 +02:00
|
|
|
import { SystemConfigNewVersionCheckDto } from './system-config-new-version-check.dto';
|
2022-12-09 15:51:42 -05:00
|
|
|
import { SystemConfigOAuthDto } from './system-config-oauth.dto';
|
2023-01-09 16:32:58 -05:00
|
|
|
import { SystemConfigPasswordLoginDto } from './system-config-password-login.dto';
|
2023-09-26 09:03:57 +02:00
|
|
|
import { SystemConfigReverseGeocodingDto } from './system-config-reverse-geocoding.dto';
|
2022-12-16 14:26:12 -06:00
|
|
|
import { SystemConfigStorageTemplateDto } from './system-config-storage-template.dto';
|
2023-10-23 11:38:41 -07:00
|
|
|
import { SystemConfigThemeDto } from './system-config-theme.dto';
|
2023-10-10 14:16:57 -04:00
|
|
|
import { SystemConfigThumbnailDto } from './system-config-thumbnail.dto';
|
|
|
|
import { SystemConfigTrashDto } from './system-config-trash.dto';
|
2022-12-09 15:51:42 -05:00
|
|
|
|
2023-08-25 00:15:03 -04:00
|
|
|
export class SystemConfigDto implements SystemConfig {
|
2023-04-03 06:24:18 +02:00
|
|
|
@Type(() => SystemConfigFFmpegDto)
|
2022-12-09 15:51:42 -05:00
|
|
|
@ValidateNested()
|
2023-04-03 06:24:18 +02:00
|
|
|
@IsObject()
|
2022-12-09 15:51:42 -05:00
|
|
|
ffmpeg!: SystemConfigFFmpegDto;
|
|
|
|
|
2023-08-25 00:15:03 -04:00
|
|
|
@Type(() => SystemConfigMachineLearningDto)
|
|
|
|
@ValidateNested()
|
|
|
|
@IsObject()
|
|
|
|
machineLearning!: SystemConfigMachineLearningDto;
|
|
|
|
|
2023-09-08 22:51:46 -04:00
|
|
|
@Type(() => SystemConfigMapDto)
|
|
|
|
@ValidateNested()
|
|
|
|
@IsObject()
|
|
|
|
map!: SystemConfigMapDto;
|
|
|
|
|
2023-10-24 17:05:42 +02:00
|
|
|
@Type(() => SystemConfigNewVersionCheckDto)
|
|
|
|
@ValidateNested()
|
|
|
|
@IsObject()
|
|
|
|
newVersionCheck!: SystemConfigNewVersionCheckDto;
|
|
|
|
|
2023-04-03 06:24:18 +02:00
|
|
|
@Type(() => SystemConfigOAuthDto)
|
2022-12-09 15:51:42 -05:00
|
|
|
@ValidateNested()
|
2023-04-03 06:24:18 +02:00
|
|
|
@IsObject()
|
2022-12-09 15:51:42 -05:00
|
|
|
oauth!: SystemConfigOAuthDto;
|
2022-12-16 14:26:12 -06:00
|
|
|
|
2023-04-03 06:24:18 +02:00
|
|
|
@Type(() => SystemConfigPasswordLoginDto)
|
2023-01-09 16:32:58 -05:00
|
|
|
@ValidateNested()
|
2023-04-03 06:24:18 +02:00
|
|
|
@IsObject()
|
2023-01-09 16:32:58 -05:00
|
|
|
passwordLogin!: SystemConfigPasswordLoginDto;
|
|
|
|
|
2023-09-26 09:03:57 +02:00
|
|
|
@Type(() => SystemConfigReverseGeocodingDto)
|
|
|
|
@ValidateNested()
|
|
|
|
@IsObject()
|
|
|
|
reverseGeocoding!: SystemConfigReverseGeocodingDto;
|
|
|
|
|
2023-04-03 06:24:18 +02:00
|
|
|
@Type(() => SystemConfigStorageTemplateDto)
|
2022-12-16 14:26:12 -06:00
|
|
|
@ValidateNested()
|
2023-04-03 06:24:18 +02:00
|
|
|
@IsObject()
|
2022-12-16 14:26:12 -06:00
|
|
|
storageTemplate!: SystemConfigStorageTemplateDto;
|
2023-06-01 06:32:51 -04:00
|
|
|
|
|
|
|
@Type(() => SystemConfigJobDto)
|
|
|
|
@ValidateNested()
|
|
|
|
@IsObject()
|
|
|
|
job!: SystemConfigJobDto;
|
2023-08-08 09:39:51 -05:00
|
|
|
|
|
|
|
@Type(() => SystemConfigThumbnailDto)
|
|
|
|
@ValidateNested()
|
|
|
|
@IsObject()
|
|
|
|
thumbnail!: SystemConfigThumbnailDto;
|
2023-10-06 07:01:14 +00:00
|
|
|
|
|
|
|
@Type(() => SystemConfigTrashDto)
|
|
|
|
@ValidateNested()
|
|
|
|
@IsObject()
|
|
|
|
trash!: SystemConfigTrashDto;
|
2023-10-23 11:38:41 -07:00
|
|
|
|
|
|
|
@Type(() => SystemConfigThemeDto)
|
|
|
|
@ValidateNested()
|
|
|
|
@IsObject()
|
|
|
|
theme!: SystemConfigThemeDto;
|
2022-12-09 15:51:42 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
export function mapConfig(config: SystemConfig): SystemConfigDto {
|
|
|
|
return config;
|
|
|
|
}
|