73 lines
1.6 KiB
Dart
73 lines
1.6 KiB
Dart
/// 收藏 Domain 实体
|
|
class Favorite {
|
|
final int id;
|
|
final String parentId;
|
|
final String data;
|
|
final int createdAt;
|
|
final int updatedAt;
|
|
final int deletedAt;
|
|
final int? source;
|
|
final int? userId;
|
|
final int? authorId;
|
|
final String typ;
|
|
final String tag;
|
|
final int isPin;
|
|
final int chatTyp;
|
|
final int isUploaded;
|
|
final String urls;
|
|
|
|
const Favorite({
|
|
required this.id,
|
|
this.parentId = '',
|
|
this.data = '',
|
|
this.createdAt = 0,
|
|
this.updatedAt = 0,
|
|
this.deletedAt = 0,
|
|
this.source,
|
|
this.userId,
|
|
this.authorId,
|
|
this.typ = '[]',
|
|
this.tag = '[]',
|
|
this.isPin = 0,
|
|
this.chatTyp = 0,
|
|
this.isUploaded = 1,
|
|
this.urls = '[]',
|
|
});
|
|
|
|
Favorite copyWith({
|
|
int? id,
|
|
String? parentId,
|
|
String? data,
|
|
int? createdAt,
|
|
int? updatedAt,
|
|
int? deletedAt,
|
|
int? source,
|
|
int? userId,
|
|
int? authorId,
|
|
String? typ,
|
|
String? tag,
|
|
int? isPin,
|
|
int? chatTyp,
|
|
int? isUploaded,
|
|
String? urls,
|
|
}) {
|
|
return Favorite(
|
|
id: id ?? this.id,
|
|
parentId: parentId ?? this.parentId,
|
|
data: data ?? this.data,
|
|
createdAt: createdAt ?? this.createdAt,
|
|
updatedAt: updatedAt ?? this.updatedAt,
|
|
deletedAt: deletedAt ?? this.deletedAt,
|
|
source: source ?? this.source,
|
|
userId: userId ?? this.userId,
|
|
authorId: authorId ?? this.authorId,
|
|
typ: typ ?? this.typ,
|
|
tag: tag ?? this.tag,
|
|
isPin: isPin ?? this.isPin,
|
|
chatTyp: chatTyp ?? this.chatTyp,
|
|
isUploaded: isUploaded ?? this.isUploaded,
|
|
urls: urls ?? this.urls,
|
|
);
|
|
}
|
|
}
|