/// Description: car model
/// Time       : 09/04/2023 Monday
/// Author     : liuyuqi.gov@msn.cn
class CarModel {
  int id;
  String brand;
  String type;
  bool start;

  CarModel({
    required this.id,
    required this.brand,
    required this.type,
    this.start = false,
  });

  CarModel.fromJson(Map<String, dynamic> json)
      : id = json['id'],
        brand = json['brand'],
        type = json['type'],
        start = json['start'] == 1 ? true : false;

  Map<String, dynamic> toJson() {
    return {
      'id': id,
      'brand': brand,
      'type': type,
      'start': start == true ? 1 : 0,
    };
  }
}