rluv_client/lib/models/family_model.dart
2023-07-27 01:40:26 -06:00

32 lines
754 B
Dart

import 'package:json_annotation/json_annotation.dart';
import '../global/utils.dart';
part 'family_model.g.dart';
@JsonSerializable()
class FamilyModel {
const FamilyModel({
required this.id,
required this.code,
required this.createdAt,
required this.updatedAt,
this.hide = false,
});
final int id;
final String? code;
@JsonKey(fromJson: boolFromJson, toJson: boolToJson)
final bool hide;
@JsonKey(fromJson: dateFromJson, toJson: dateToJson)
final DateTime createdAt;
@JsonKey(fromJson: dateFromJson, toJson: dateToJson)
final DateTime updatedAt;
factory FamilyModel.fromJson(Map<String, dynamic> json) =>
_$FamilyModelFromJson(json);
Map<String, dynamic> toJson() => _$FamilyModelToJson(this);
}