/// cover : ""
/// expireTime : 0
/// id : 0
/// sysOrigin : ""
/// type : ""

class SCStartPageRes {
  SCStartPageRes({
    String? cover,
    num? expireTime,
    String? id,
    String? sysOrigin,
    String? type,
    List<StartPageUser>? user,
  }) {
    _cover = cover;
    _expireTime = expireTime;
    _id = id;
    _sysOrigin = sysOrigin;
    _type = type;
    _user = user;
  }

  SCStartPageRes.fromJson(dynamic json) {
    _cover = json['cover'];
    _expireTime = json['expireTime'];
    _id = json['id'];
    _sysOrigin = json['sysOrigin'];
    _type = json['type'];
    if (json['user'] != null) {
      _user = [];
      json['user'].forEach((v) {
        _user?.add(StartPageUser.fromJson(v));
      });
    }
  }

  String? _cover;
  num? _expireTime;
  String? _id;
  String? _sysOrigin;
  String? _type;
  List<StartPageUser>? _user;

  SCStartPageRes copyWith({
    String? cover,
    num? expireTime,
    String? id,
    String? sysOrigin,
    String? type,
    List<StartPageUser>? user,
  }) => SCStartPageRes(
    cover: cover ?? _cover,
    expireTime: expireTime ?? _expireTime,
    id: id ?? _id,
    sysOrigin: sysOrigin ?? _sysOrigin,
    type: type ?? _type,
    user: user ?? _user,
  );

  String? get cover => _cover;

  num? get expireTime => _expireTime;

  String? get id => _id;

  String? get sysOrigin => _sysOrigin;

  String? get type => _type;

  List<StartPageUser>? get user => _user;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['cover'] = _cover;
    map['expireTime'] = _expireTime;
    map['id'] = _id;
    map['sysOrigin'] = _sysOrigin;
    map['type'] = _type;
    if (_user != null) {
      map['user'] = _user?.map((v) => v.toJson()).toList();
    }
    return map;
  }
}

class StartPageUser {
  StartPageUser({String? account, String? nickName, String? avatar}) {
    _account = account;
    _nickName = nickName;
    _avatar = avatar;
  }

  StartPageUser.fromJson(dynamic json) {
    _account = json['account'];
    _nickName = json['nickName'];
    _avatar = json['avatar'];
  }

  String? _account;
  String? _nickName;
  String? _avatar;

  StartPageUser copyWith({String? account, String? nickName, String? avatar}) =>
      StartPageUser(
        account: account ?? _account,
        nickName: nickName ?? _nickName,
        avatar: avatar ?? _avatar,
      );

  String? get account => _account;

  String? get nickName => _nickName;

  String? get avatar => _avatar;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['account'] = _account;
    map['nickName'] = _nickName;
    map['avatar'] = _avatar;
    return map;
  }
}
