import 'package:json_annotation/json_annotation.dart';

part 'HouseLevel.g.dart';

@JsonSerializable()
class HouseLevel {
  HouseLevel(this.id, this.levelName, this.icon, this.entryCoin);
  int id;
  String levelName;//名称
  String icon;//图标
  int entryCoin;//加入金额
  factory HouseLevel.fromJson(Map<String, dynamic> json) =>
      _$HouseLevelFromJson(json);

  Map<String, dynamic> toJson() => _$HouseLevelToJson(this);
  // 命名构造函数
  HouseLevel.empty();
  @override
  String toString() {
    return _$HouseLevelToJson(this).toString();
  }
}
