1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-16 07:24:40 +02:00

feat: built-in automatic database backups (#13773)

This commit is contained in:
Zack Pollard
2024-10-31 11:29:42 +00:00
committed by GitHub
parent 30d42e571c
commit 7d933ec97a
41 changed files with 994 additions and 17 deletions

View File

@ -13,6 +13,7 @@ part of openapi.api;
class SystemConfigDto {
/// Returns a new [SystemConfigDto] instance.
SystemConfigDto({
required this.backup,
required this.ffmpeg,
required this.image,
required this.job,
@ -33,6 +34,8 @@ class SystemConfigDto {
required this.user,
});
SystemConfigBackupsDto backup;
SystemConfigFFmpegDto ffmpeg;
SystemConfigImageDto image;
@ -71,6 +74,7 @@ class SystemConfigDto {
@override
bool operator ==(Object other) => identical(this, other) || other is SystemConfigDto &&
other.backup == backup &&
other.ffmpeg == ffmpeg &&
other.image == image &&
other.job == job &&
@ -93,6 +97,7 @@ class SystemConfigDto {
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(backup.hashCode) +
(ffmpeg.hashCode) +
(image.hashCode) +
(job.hashCode) +
@ -113,10 +118,11 @@ class SystemConfigDto {
(user.hashCode);
@override
String toString() => 'SystemConfigDto[ffmpeg=$ffmpeg, image=$image, job=$job, library_=$library_, logging=$logging, machineLearning=$machineLearning, map=$map, metadata=$metadata, newVersionCheck=$newVersionCheck, notifications=$notifications, oauth=$oauth, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, server=$server, storageTemplate=$storageTemplate, theme=$theme, trash=$trash, user=$user]';
String toString() => 'SystemConfigDto[backup=$backup, ffmpeg=$ffmpeg, image=$image, job=$job, library_=$library_, logging=$logging, machineLearning=$machineLearning, map=$map, metadata=$metadata, newVersionCheck=$newVersionCheck, notifications=$notifications, oauth=$oauth, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, server=$server, storageTemplate=$storageTemplate, theme=$theme, trash=$trash, user=$user]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'backup'] = this.backup;
json[r'ffmpeg'] = this.ffmpeg;
json[r'image'] = this.image;
json[r'job'] = this.job;
@ -147,6 +153,7 @@ class SystemConfigDto {
final json = value.cast<String, dynamic>();
return SystemConfigDto(
backup: SystemConfigBackupsDto.fromJson(json[r'backup'])!,
ffmpeg: SystemConfigFFmpegDto.fromJson(json[r'ffmpeg'])!,
image: SystemConfigImageDto.fromJson(json[r'image'])!,
job: SystemConfigJobDto.fromJson(json[r'job'])!,
@ -212,6 +219,7 @@ class SystemConfigDto {
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'backup',
'ffmpeg',
'image',
'job',