Frontend first draft
This commit is contained in:
20
frontend/pshared/lib/data/dto/storable.dart
Normal file
20
frontend/pshared/lib/data/dto/storable.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'storable.g.dart';
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class StorableDTO {
|
||||
final String id;
|
||||
final DateTime createdAt;
|
||||
final DateTime updatedAt;
|
||||
|
||||
const StorableDTO({
|
||||
required this.id,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
});
|
||||
|
||||
factory StorableDTO.fromJson(Map<String, dynamic> json) => _$StorableDTOFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$StorableDTOToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user