refactor(server): change asset entity to date type (#2599)

* refactor(server): change asset entity to date type

* lower coverage threshold
This commit is contained in:
Michel Heusschen 2023-05-29 16:05:14 +02:00 committed by GitHub
parent caba462703
commit 94d0705607
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 98 additions and 93 deletions

View file

@ -52,11 +52,11 @@ class AssetResponseDto {
bool resized;
String fileCreatedAt;
DateTime fileCreatedAt;
String fileModifiedAt;
DateTime fileModifiedAt;
String updatedAt;
DateTime updatedAt;
bool isFavorite;
@ -153,9 +153,9 @@ class AssetResponseDto {
json[r'originalPath'] = this.originalPath;
json[r'originalFileName'] = this.originalFileName;
json[r'resized'] = this.resized;
json[r'fileCreatedAt'] = this.fileCreatedAt;
json[r'fileModifiedAt'] = this.fileModifiedAt;
json[r'updatedAt'] = this.updatedAt;
json[r'fileCreatedAt'] = this.fileCreatedAt.toUtc().toIso8601String();
json[r'fileModifiedAt'] = this.fileModifiedAt.toUtc().toIso8601String();
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
json[r'isFavorite'] = this.isFavorite;
json[r'isArchived'] = this.isArchived;
if (this.mimeType != null) {
@ -212,9 +212,9 @@ class AssetResponseDto {
originalPath: mapValueOfType<String>(json, r'originalPath')!,
originalFileName: mapValueOfType<String>(json, r'originalFileName')!,
resized: mapValueOfType<bool>(json, r'resized')!,
fileCreatedAt: mapValueOfType<String>(json, r'fileCreatedAt')!,
fileModifiedAt: mapValueOfType<String>(json, r'fileModifiedAt')!,
updatedAt: mapValueOfType<String>(json, r'updatedAt')!,
fileCreatedAt: mapDateTime(json, r'fileCreatedAt', '')!,
fileModifiedAt: mapDateTime(json, r'fileModifiedAt', '')!,
updatedAt: mapDateTime(json, r'updatedAt', '')!,
isFavorite: mapValueOfType<bool>(json, r'isFavorite')!,
isArchived: mapValueOfType<bool>(json, r'isArchived')!,
mimeType: mapValueOfType<String>(json, r'mimeType'),