import 'package:domain/generated/json/base/json_field.dart';
import 'package:domain/generated/json/hotel_info_entity.g.dart';
import 'dart:convert';
export 'package:domain/generated/json/hotel_info_entity.g.dart';

@JsonSerializable()
class HotelInfoEntity {
	@JSONField(name: "admin_id")
	int? adminId = 0;
	String? name = '';
	@JSONField(name: "hotel_id")
	int? hotelId = 0;
	@JSONField(name: "hotel_name")
	String? hotelName = '';
	List<HotelInfoMenus>? menus = [];
	String? token = '';

	HotelInfoEntity();

	factory HotelInfoEntity.fromJson(Map<String, dynamic> json) => $HotelInfoEntityFromJson(json);

	Map<String, dynamic> toJson() => $HotelInfoEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class HotelInfoMenus {
	String? key = '';
	String? name = '';
	String? route = '';  //泰国的根据这个判断类型
	@JSONField(name: "red_dot")
	String? redDot = '';
	bool own = false;

	List<HotelInfoMenusChildren>? children = [];

	HotelInfoMenus();

	factory HotelInfoMenus.fromJson(Map<String, dynamic> json) => $HotelInfoMenusFromJson(json);

	Map<String, dynamic> toJson() => $HotelInfoMenusToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class HotelInfoMenusChildren {
	String? key = '';
	String? name = '';

	HotelInfoMenusChildren();

	factory HotelInfoMenusChildren.fromJson(Map<String, dynamic> json) => $HotelInfoMenusChildrenFromJson(json);

	Map<String, dynamic> toJson() => $HotelInfoMenusChildrenToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}