import 'package:json_annotation/json_annotation.dart';

part 'UserLevel.g.dart';

@JsonSerializable()
class UserLevel {
  UserLevel(this.id, this.name);
  int id;
  String name;//名称
  factory UserLevel.fromJson(Map<String, dynamic> json) =>
      _$UserLevelFromJson(json);

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