mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
chore(server): typeorm definitions fix part 3 (#1796)
* chore(server): tidy up exif typeorm entity definition * chore(server): tidy up shared link typeorm entity definition * chore(server): tidy up smart info typeorm entity definition * chore(server): tidy up tag typeorm entity definition * ci: add job that checks typeorm migrations are correct and up-to-date
This commit is contained in:
@@ -13,46 +13,30 @@ part of openapi.api;
|
||||
class SmartInfoResponseDto {
|
||||
/// Returns a new [SmartInfoResponseDto] instance.
|
||||
SmartInfoResponseDto({
|
||||
this.id,
|
||||
this.tags = const [],
|
||||
this.objects = const [],
|
||||
});
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? id;
|
||||
|
||||
List<String>? tags;
|
||||
|
||||
List<String>? objects;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SmartInfoResponseDto &&
|
||||
other.id == id &&
|
||||
other.tags == tags &&
|
||||
other.objects == objects;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(id == null ? 0 : id!.hashCode) +
|
||||
(tags == null ? 0 : tags!.hashCode) +
|
||||
(objects == null ? 0 : objects!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SmartInfoResponseDto[id=$id, tags=$tags, objects=$objects]';
|
||||
String toString() => 'SmartInfoResponseDto[tags=$tags, objects=$objects]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
if (this.id != null) {
|
||||
json[r'id'] = this.id;
|
||||
} else {
|
||||
// json[r'id'] = null;
|
||||
}
|
||||
if (this.tags != null) {
|
||||
json[r'tags'] = this.tags;
|
||||
} else {
|
||||
@@ -85,7 +69,6 @@ class SmartInfoResponseDto {
|
||||
}());
|
||||
|
||||
return SmartInfoResponseDto(
|
||||
id: mapValueOfType<String>(json, r'id'),
|
||||
tags: json[r'tags'] is List
|
||||
? (json[r'tags'] as List).cast<String>()
|
||||
: const [],
|
||||
|
||||
Reference in New Issue
Block a user