1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- import 'package:domain/generated/json/base/json_field.dart';
- import 'package:domain/generated/json/facility_book_entity.g.dart';
- import 'dart:convert';
- export 'package:domain/generated/json/facility_book_entity.g.dart';
- @JsonSerializable()
- class FacilityBookEntity {
- @JSONField(name: "remain_quota")
- int remainQuota = 0;
- @JSONField(name: "quota_reset_on")
- String? quotaResetOn;
- @JSONField(name: "facility_type")
- FacilityBookFacilityType? facilityType;
- List<FacilityBookFacilities>? facilities = [];
- FacilityBookEntity();
- factory FacilityBookEntity.fromJson(Map<String, dynamic> json) => $FacilityBookEntityFromJson(json);
- Map<String, dynamic> toJson() => $FacilityBookEntityToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class FacilityBookFacilityType {
- @JSONField(name: "book_advance_days")
- int bookAdvanceDays = 0;
- int quota = 0;
- @JSONField(name: "quota_reset_type")
- String? quotaResetType;
- FacilityBookFacilityType();
- factory FacilityBookFacilityType.fromJson(Map<String, dynamic> json) => $FacilityBookFacilityTypeFromJson(json);
- Map<String, dynamic> toJson() => $FacilityBookFacilityTypeToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class FacilityBookFacilities {
- String? id;
- String? name;
- List<FacilityBookFacilitiesPeriods>? periods = [];
- FacilityBookFacilities();
- factory FacilityBookFacilities.fromJson(Map<String, dynamic> json) => $FacilityBookFacilitiesFromJson(json);
- Map<String, dynamic> toJson() => $FacilityBookFacilitiesToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class FacilityBookFacilitiesPeriods {
- String? id;
- String? start;
- String? end;
- String? price;
- String? deposit;
- bool enable = true;
- bool selected = false;
- FacilityBookFacilitiesPeriods();
- factory FacilityBookFacilitiesPeriods.fromJson(Map<String, dynamic> json) => $FacilityBookFacilitiesPeriodsFromJson(json);
- Map<String, dynamic> toJson() => $FacilityBookFacilitiesPeriodsToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
|