app_nav_entity.dart 1.96 KB
class AppNavEntity {
  static AppNavEntity fromJson(Map<String, dynamic>? json) {
    return AppNavEntity.from(json!);
  }

  String? id;
  String? name;
  String? title;
  String? iconUrl;
  String? redirectType;
  String? androidRedirectUrl;
  String? iosRedirectUrl;
  String? bindParams;
  String? groupId;
  String? behaviorType;
  String? dayNumber;
  String? startTime;
  String? endTime;
  String? specificTime;

  AppNavEntity(
      {this.id,
      this.name,
      this.title,
      this.iconUrl,
      this.redirectType,
      this.androidRedirectUrl,
      this.iosRedirectUrl,
      this.bindParams,
      this.groupId,
      this.behaviorType,
      this.dayNumber,
      this.startTime,
      this.endTime,
      this.specificTime});

  AppNavEntity.from(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
    title = json['title'];
    iconUrl = json['icon_url'];
    redirectType = json['redirect_type'];
    androidRedirectUrl = json['android_redirect_url'];
    iosRedirectUrl = json['ios_redirect_url'];
    bindParams = json['bind_params'];
    groupId = json['group_id'];
    behaviorType = json['behavior_type'];
    dayNumber = json['day_number'];
    startTime = json['start_time'];
    endTime = json['end_time'];
    specificTime = json['specific_time'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    data['title'] = this.title;
    data['icon_url'] = this.iconUrl;
    data['redirect_type'] = this.redirectType;
    data['android_redirect_url'] = this.androidRedirectUrl;
    data['ios_redirect_url'] = this.iosRedirectUrl;
    data['bind_params'] = this.bindParams;
    data['group_id'] = this.groupId;
    data['behavior_type'] = this.behaviorType;
    data['day_number'] = this.dayNumber;
    data['start_time'] = this.startTime;
    data['end_time'] = this.endTime;
    data['specific_time'] = this.specificTime;
    return data;
  }
}