mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat(server/web): album description (#3558)
* feat(server): add album description * chore: open api * fix: tests * show and edit description on the web * fix test * remove unused code * type event * format fix --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
deaf81e2a4
commit
2f26a7edae
28 changed files with 287 additions and 41 deletions
10
mobile/openapi/lib/model/album_response_dto.dart
generated
10
mobile/openapi/lib/model/album_response_dto.dart
generated
|
|
@ -18,6 +18,7 @@ class AlbumResponseDto {
|
|||
required this.assetCount,
|
||||
this.assets = const [],
|
||||
required this.createdAt,
|
||||
required this.description,
|
||||
required this.id,
|
||||
this.lastModifiedAssetTimestamp,
|
||||
required this.owner,
|
||||
|
|
@ -37,6 +38,8 @@ class AlbumResponseDto {
|
|||
|
||||
DateTime createdAt;
|
||||
|
||||
String description;
|
||||
|
||||
String id;
|
||||
|
||||
///
|
||||
|
|
@ -64,6 +67,7 @@ class AlbumResponseDto {
|
|||
other.assetCount == assetCount &&
|
||||
other.assets == assets &&
|
||||
other.createdAt == createdAt &&
|
||||
other.description == description &&
|
||||
other.id == id &&
|
||||
other.lastModifiedAssetTimestamp == lastModifiedAssetTimestamp &&
|
||||
other.owner == owner &&
|
||||
|
|
@ -80,6 +84,7 @@ class AlbumResponseDto {
|
|||
(assetCount.hashCode) +
|
||||
(assets.hashCode) +
|
||||
(createdAt.hashCode) +
|
||||
(description.hashCode) +
|
||||
(id.hashCode) +
|
||||
(lastModifiedAssetTimestamp == null ? 0 : lastModifiedAssetTimestamp!.hashCode) +
|
||||
(owner.hashCode) +
|
||||
|
|
@ -89,7 +94,7 @@ class AlbumResponseDto {
|
|||
(updatedAt.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AlbumResponseDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId, assetCount=$assetCount, assets=$assets, createdAt=$createdAt, id=$id, lastModifiedAssetTimestamp=$lastModifiedAssetTimestamp, owner=$owner, ownerId=$ownerId, shared=$shared, sharedUsers=$sharedUsers, updatedAt=$updatedAt]';
|
||||
String toString() => 'AlbumResponseDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId, assetCount=$assetCount, assets=$assets, createdAt=$createdAt, description=$description, id=$id, lastModifiedAssetTimestamp=$lastModifiedAssetTimestamp, owner=$owner, ownerId=$ownerId, shared=$shared, sharedUsers=$sharedUsers, updatedAt=$updatedAt]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
|
|
@ -102,6 +107,7 @@ class AlbumResponseDto {
|
|||
json[r'assetCount'] = this.assetCount;
|
||||
json[r'assets'] = this.assets;
|
||||
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
|
||||
json[r'description'] = this.description;
|
||||
json[r'id'] = this.id;
|
||||
if (this.lastModifiedAssetTimestamp != null) {
|
||||
json[r'lastModifiedAssetTimestamp'] = this.lastModifiedAssetTimestamp!.toUtc().toIso8601String();
|
||||
|
|
@ -129,6 +135,7 @@ class AlbumResponseDto {
|
|||
assetCount: mapValueOfType<int>(json, r'assetCount')!,
|
||||
assets: AssetResponseDto.listFromJson(json[r'assets']),
|
||||
createdAt: mapDateTime(json, r'createdAt', r'')!,
|
||||
description: mapValueOfType<String>(json, r'description')!,
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
lastModifiedAssetTimestamp: mapDateTime(json, r'lastModifiedAssetTimestamp', r''),
|
||||
owner: UserResponseDto.fromJson(json[r'owner'])!,
|
||||
|
|
@ -188,6 +195,7 @@ class AlbumResponseDto {
|
|||
'assetCount',
|
||||
'assets',
|
||||
'createdAt',
|
||||
'description',
|
||||
'id',
|
||||
'owner',
|
||||
'ownerId',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue