mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
server is striped
This commit is contained in:
+55
-143
@@ -13,27 +13,31 @@ part of openapi.api;
|
||||
class UserAdminResponseDto {
|
||||
/// Returns a new [UserAdminResponseDto] instance.
|
||||
UserAdminResponseDto({
|
||||
required this.avatarColor,
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.email,
|
||||
required this.shouldChangePassword,
|
||||
required this.isAdmin,
|
||||
required this.createdAt,
|
||||
required this.deletedAt,
|
||||
required this.email,
|
||||
required this.id,
|
||||
required this.isAdmin,
|
||||
required this.license,
|
||||
required this.name,
|
||||
required this.oauthId,
|
||||
required this.profileChangedAt,
|
||||
required this.profileImagePath,
|
||||
required this.quotaSizeInBytes,
|
||||
required this.quotaUsageInBytes,
|
||||
required this.shouldChangePassword,
|
||||
required this.status,
|
||||
required this.storageLabel,
|
||||
required this.updatedAt,
|
||||
required this.status,
|
||||
});
|
||||
|
||||
/// Avatar color
|
||||
UserAvatarColor avatarColor;
|
||||
/// User ID
|
||||
String id;
|
||||
|
||||
/// User name
|
||||
String name;
|
||||
|
||||
/// User email
|
||||
String email;
|
||||
|
||||
/// Require password change on next login
|
||||
bool shouldChangePassword;
|
||||
|
||||
/// Is admin user
|
||||
bool isAdmin;
|
||||
|
||||
/// Creation date
|
||||
DateTime createdAt;
|
||||
@@ -41,131 +45,55 @@ class UserAdminResponseDto {
|
||||
/// Deletion date
|
||||
DateTime? deletedAt;
|
||||
|
||||
/// User email
|
||||
String email;
|
||||
|
||||
/// User ID
|
||||
String id;
|
||||
|
||||
/// Is admin user
|
||||
bool isAdmin;
|
||||
|
||||
/// User license
|
||||
UserLicense? license;
|
||||
|
||||
/// User name
|
||||
String name;
|
||||
|
||||
/// OAuth ID
|
||||
String oauthId;
|
||||
|
||||
/// Profile change date
|
||||
DateTime profileChangedAt;
|
||||
|
||||
/// Profile image path
|
||||
String profileImagePath;
|
||||
|
||||
/// Storage quota in bytes
|
||||
int? quotaSizeInBytes;
|
||||
|
||||
/// Storage usage in bytes
|
||||
int? quotaUsageInBytes;
|
||||
|
||||
/// Require password change on next login
|
||||
bool shouldChangePassword;
|
||||
/// Last update date
|
||||
DateTime updatedAt;
|
||||
|
||||
/// User status
|
||||
UserStatus status;
|
||||
|
||||
/// Storage label
|
||||
String? storageLabel;
|
||||
|
||||
/// Last update date
|
||||
DateTime updatedAt;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is UserAdminResponseDto &&
|
||||
other.avatarColor == avatarColor &&
|
||||
other.id == id &&
|
||||
other.name == name &&
|
||||
other.email == email &&
|
||||
other.shouldChangePassword == shouldChangePassword &&
|
||||
other.isAdmin == isAdmin &&
|
||||
other.createdAt == createdAt &&
|
||||
other.deletedAt == deletedAt &&
|
||||
other.email == email &&
|
||||
other.id == id &&
|
||||
other.isAdmin == isAdmin &&
|
||||
other.license == license &&
|
||||
other.name == name &&
|
||||
other.oauthId == oauthId &&
|
||||
other.profileChangedAt == profileChangedAt &&
|
||||
other.profileImagePath == profileImagePath &&
|
||||
other.quotaSizeInBytes == quotaSizeInBytes &&
|
||||
other.quotaUsageInBytes == quotaUsageInBytes &&
|
||||
other.shouldChangePassword == shouldChangePassword &&
|
||||
other.status == status &&
|
||||
other.storageLabel == storageLabel &&
|
||||
other.updatedAt == updatedAt;
|
||||
other.updatedAt == updatedAt &&
|
||||
other.status == status;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(avatarColor.hashCode) +
|
||||
(id.hashCode) +
|
||||
(name.hashCode) +
|
||||
(email.hashCode) +
|
||||
(shouldChangePassword.hashCode) +
|
||||
(isAdmin.hashCode) +
|
||||
(createdAt.hashCode) +
|
||||
(deletedAt == null ? 0 : deletedAt!.hashCode) +
|
||||
(email.hashCode) +
|
||||
(id.hashCode) +
|
||||
(isAdmin.hashCode) +
|
||||
(license == null ? 0 : license!.hashCode) +
|
||||
(name.hashCode) +
|
||||
(oauthId.hashCode) +
|
||||
(profileChangedAt.hashCode) +
|
||||
(profileImagePath.hashCode) +
|
||||
(quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) +
|
||||
(quotaUsageInBytes == null ? 0 : quotaUsageInBytes!.hashCode) +
|
||||
(shouldChangePassword.hashCode) +
|
||||
(status.hashCode) +
|
||||
(storageLabel == null ? 0 : storageLabel!.hashCode) +
|
||||
(updatedAt.hashCode);
|
||||
(updatedAt.hashCode) +
|
||||
(status.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'UserAdminResponseDto[avatarColor=$avatarColor, createdAt=$createdAt, deletedAt=$deletedAt, email=$email, id=$id, isAdmin=$isAdmin, license=$license, name=$name, oauthId=$oauthId, profileChangedAt=$profileChangedAt, profileImagePath=$profileImagePath, quotaSizeInBytes=$quotaSizeInBytes, quotaUsageInBytes=$quotaUsageInBytes, shouldChangePassword=$shouldChangePassword, status=$status, storageLabel=$storageLabel, updatedAt=$updatedAt]';
|
||||
String toString() => 'UserAdminResponseDto[id=$id, name=$name, email=$email, shouldChangePassword=$shouldChangePassword, isAdmin=$isAdmin, createdAt=$createdAt, deletedAt=$deletedAt, updatedAt=$updatedAt, status=$status]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'avatarColor'] = this.avatarColor;
|
||||
json[r'id'] = this.id;
|
||||
json[r'name'] = this.name;
|
||||
json[r'email'] = this.email;
|
||||
json[r'shouldChangePassword'] = this.shouldChangePassword;
|
||||
json[r'isAdmin'] = this.isAdmin;
|
||||
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
|
||||
if (this.deletedAt != null) {
|
||||
json[r'deletedAt'] = this.deletedAt!.toUtc().toIso8601String();
|
||||
} else {
|
||||
// json[r'deletedAt'] = null;
|
||||
}
|
||||
json[r'email'] = this.email;
|
||||
json[r'id'] = this.id;
|
||||
json[r'isAdmin'] = this.isAdmin;
|
||||
if (this.license != null) {
|
||||
json[r'license'] = this.license;
|
||||
} else {
|
||||
// json[r'license'] = null;
|
||||
}
|
||||
json[r'name'] = this.name;
|
||||
json[r'oauthId'] = this.oauthId;
|
||||
json[r'profileChangedAt'] = this.profileChangedAt.toUtc().toIso8601String();
|
||||
json[r'profileImagePath'] = this.profileImagePath;
|
||||
if (this.quotaSizeInBytes != null) {
|
||||
json[r'quotaSizeInBytes'] = this.quotaSizeInBytes;
|
||||
} else {
|
||||
// json[r'quotaSizeInBytes'] = null;
|
||||
}
|
||||
if (this.quotaUsageInBytes != null) {
|
||||
json[r'quotaUsageInBytes'] = this.quotaUsageInBytes;
|
||||
} else {
|
||||
// json[r'quotaUsageInBytes'] = null;
|
||||
}
|
||||
json[r'shouldChangePassword'] = this.shouldChangePassword;
|
||||
json[r'status'] = this.status;
|
||||
if (this.storageLabel != null) {
|
||||
json[r'storageLabel'] = this.storageLabel;
|
||||
} else {
|
||||
// json[r'storageLabel'] = null;
|
||||
}
|
||||
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
|
||||
json[r'status'] = this.status;
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -178,23 +106,15 @@ class UserAdminResponseDto {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return UserAdminResponseDto(
|
||||
avatarColor: UserAvatarColor.fromJson(json[r'avatarColor'])!,
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
email: mapValueOfType<String>(json, r'email')!,
|
||||
shouldChangePassword: mapValueOfType<bool>(json, r'shouldChangePassword')!,
|
||||
isAdmin: mapValueOfType<bool>(json, r'isAdmin')!,
|
||||
createdAt: mapDateTime(json, r'createdAt', r'')!,
|
||||
deletedAt: mapDateTime(json, r'deletedAt', r''),
|
||||
email: mapValueOfType<String>(json, r'email')!,
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
isAdmin: mapValueOfType<bool>(json, r'isAdmin')!,
|
||||
license: UserLicense.fromJson(json[r'license']),
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
oauthId: mapValueOfType<String>(json, r'oauthId')!,
|
||||
profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!,
|
||||
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
|
||||
quotaSizeInBytes: mapValueOfType<int>(json, r'quotaSizeInBytes'),
|
||||
quotaUsageInBytes: mapValueOfType<int>(json, r'quotaUsageInBytes'),
|
||||
shouldChangePassword: mapValueOfType<bool>(json, r'shouldChangePassword')!,
|
||||
status: UserStatus.fromJson(json[r'status'])!,
|
||||
storageLabel: mapValueOfType<String>(json, r'storageLabel'),
|
||||
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
|
||||
status: UserStatus.fromJson(json[r'status'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
@@ -242,23 +162,15 @@ class UserAdminResponseDto {
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'avatarColor',
|
||||
'id',
|
||||
'name',
|
||||
'email',
|
||||
'shouldChangePassword',
|
||||
'isAdmin',
|
||||
'createdAt',
|
||||
'deletedAt',
|
||||
'email',
|
||||
'id',
|
||||
'isAdmin',
|
||||
'license',
|
||||
'name',
|
||||
'oauthId',
|
||||
'profileChangedAt',
|
||||
'profileImagePath',
|
||||
'quotaSizeInBytes',
|
||||
'quotaUsageInBytes',
|
||||
'shouldChangePassword',
|
||||
'status',
|
||||
'storageLabel',
|
||||
'updatedAt',
|
||||
'status',
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user