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:
Zack Pollard
2023-02-20 01:50:27 +00:00
committed by GitHub
parent 5d3e8f17d1
commit d1ea6a897e
21 changed files with 140 additions and 101 deletions

View File

@@ -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 [],