mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
refactor: library type (#9525)
This commit is contained in:
parent
4353153fe6
commit
84d824d6a7
66 changed files with 183 additions and 984 deletions
14
mobile/openapi/lib/model/create_library_dto.dart
generated
14
mobile/openapi/lib/model/create_library_dto.dart
generated
|
|
@ -17,7 +17,6 @@ class CreateLibraryDto {
|
|||
this.importPaths = const [],
|
||||
this.name,
|
||||
required this.ownerId,
|
||||
required this.type,
|
||||
});
|
||||
|
||||
List<String> exclusionPatterns;
|
||||
|
|
@ -34,15 +33,12 @@ class CreateLibraryDto {
|
|||
|
||||
String ownerId;
|
||||
|
||||
LibraryType type;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is CreateLibraryDto &&
|
||||
_deepEquality.equals(other.exclusionPatterns, exclusionPatterns) &&
|
||||
_deepEquality.equals(other.importPaths, importPaths) &&
|
||||
other.name == name &&
|
||||
other.ownerId == ownerId &&
|
||||
other.type == type;
|
||||
other.ownerId == ownerId;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
|
|
@ -50,11 +46,10 @@ class CreateLibraryDto {
|
|||
(exclusionPatterns.hashCode) +
|
||||
(importPaths.hashCode) +
|
||||
(name == null ? 0 : name!.hashCode) +
|
||||
(ownerId.hashCode) +
|
||||
(type.hashCode);
|
||||
(ownerId.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'CreateLibraryDto[exclusionPatterns=$exclusionPatterns, importPaths=$importPaths, name=$name, ownerId=$ownerId, type=$type]';
|
||||
String toString() => 'CreateLibraryDto[exclusionPatterns=$exclusionPatterns, importPaths=$importPaths, name=$name, ownerId=$ownerId]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
|
|
@ -66,7 +61,6 @@ class CreateLibraryDto {
|
|||
// json[r'name'] = null;
|
||||
}
|
||||
json[r'ownerId'] = this.ownerId;
|
||||
json[r'type'] = this.type;
|
||||
return json;
|
||||
}
|
||||
|
||||
|
|
@ -86,7 +80,6 @@ class CreateLibraryDto {
|
|||
: const [],
|
||||
name: mapValueOfType<String>(json, r'name'),
|
||||
ownerId: mapValueOfType<String>(json, r'ownerId')!,
|
||||
type: LibraryType.fromJson(json[r'type'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
|
@ -135,7 +128,6 @@ class CreateLibraryDto {
|
|||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'ownerId',
|
||||
'type',
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue