1)修改数据库命名,不和业务使用重合。
2)修改user 表,uid为unique, 聊天室文件夹name unique移除
This commit is contained in:
@@ -14,15 +14,81 @@
|
||||
/// → View 渲染
|
||||
/// ```
|
||||
class User {
|
||||
final String id;
|
||||
final String email;
|
||||
final int uid;
|
||||
final String? uuid;
|
||||
final int? lastOnline;
|
||||
final String? profilePic;
|
||||
final String? profilePicGaussian;
|
||||
final String? nickname;
|
||||
final String? avatar;
|
||||
final String? contact;
|
||||
final String? countryCode;
|
||||
final String? email;
|
||||
final String? recoveryEmail;
|
||||
final String? username;
|
||||
final String? bio;
|
||||
final int? relationship;
|
||||
final String? userAlias;
|
||||
final int? channelId;
|
||||
final int? channelGroupId;
|
||||
final String? hint;
|
||||
|
||||
const User({
|
||||
required this.id,
|
||||
required this.email,
|
||||
required this.uid,
|
||||
this.uuid,
|
||||
this.lastOnline,
|
||||
this.profilePic,
|
||||
this.profilePicGaussian,
|
||||
this.nickname,
|
||||
this.avatar,
|
||||
this.contact,
|
||||
this.countryCode,
|
||||
this.email,
|
||||
this.recoveryEmail,
|
||||
this.username,
|
||||
this.bio,
|
||||
this.relationship,
|
||||
this.userAlias,
|
||||
this.channelId,
|
||||
this.channelGroupId,
|
||||
this.hint,
|
||||
});
|
||||
}
|
||||
|
||||
User copyWith({
|
||||
int? uid,
|
||||
String? uuid,
|
||||
int? lastOnline,
|
||||
String? profilePic,
|
||||
String? profilePicGaussian,
|
||||
String? nickname,
|
||||
String? contact,
|
||||
String? countryCode,
|
||||
String? email,
|
||||
String? recoveryEmail,
|
||||
String? username,
|
||||
String? bio,
|
||||
int? relationship,
|
||||
String? userAlias,
|
||||
int? channelId,
|
||||
int? channelGroupId,
|
||||
String? hint,
|
||||
}) {
|
||||
return User(
|
||||
uid: uid ?? this.uid,
|
||||
uuid: uuid ?? this.uuid,
|
||||
lastOnline: lastOnline ?? this.lastOnline,
|
||||
profilePic: profilePic ?? this.profilePic,
|
||||
profilePicGaussian: profilePicGaussian ?? this.profilePicGaussian,
|
||||
nickname: nickname ?? this.nickname,
|
||||
contact: contact ?? this.contact,
|
||||
countryCode: countryCode ?? this.countryCode,
|
||||
email: email ?? this.email,
|
||||
recoveryEmail: recoveryEmail ?? this.recoveryEmail,
|
||||
username: username ?? this.username,
|
||||
bio: bio ?? this.bio,
|
||||
relationship: relationship ?? this.relationship,
|
||||
userAlias: userAlias ?? this.userAlias,
|
||||
channelId: channelId ?? this.channelId,
|
||||
channelGroupId: channelGroupId ?? this.channelGroupId,
|
||||
hint: hint ?? this.hint,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user