20 lines
460 B
Dart
20 lines
460 B
Dart
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);
|
|
} |