初始化项目
This commit is contained in:
37
bin/domain/entities/photo.dart
Normal file
37
bin/domain/entities/photo.dart
Normal file
@@ -0,0 +1,37 @@
|
||||
class Photo {
|
||||
final int id;
|
||||
final int albumId;
|
||||
final String filePath;
|
||||
final String fileName;
|
||||
final int fileSize;
|
||||
final String mimeType;
|
||||
final int? width;
|
||||
final int? height;
|
||||
final DateTime createdAt;
|
||||
|
||||
Photo({
|
||||
required this.id,
|
||||
required this.albumId,
|
||||
required this.filePath,
|
||||
required this.fileName,
|
||||
required this.fileSize,
|
||||
required this.mimeType,
|
||||
this.width,
|
||||
this.height,
|
||||
required this.createdAt,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'id': id,
|
||||
'albumId': albumId,
|
||||
'filePath': filePath,
|
||||
'fileName': fileName,
|
||||
'fileSize': fileSize,
|
||||
'mimeType': mimeType,
|
||||
'width': width,
|
||||
'height': height,
|
||||
'createdAt': createdAt.toIso8601String(),
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user