class SCFloatingMessage {
  String? userId; // 可选：用户ID
  String? roomId; // 可选：房间ID
  String? toUserId; // 可选：用户ID
  String? userAvatarUrl; // 用户头像
  String? toUserAvatarUrl; // 用户头像
  String? userName; // 用户昵称
  String? toUserName; // 用户昵称
  String? giftUrl; // 礼物图标
  int? type;
  int? rocketLevel;
  num? coins;
  num? number;
  num? multiple;
  int priority = 10; //排序权重

  SCFloatingMessage({
    this.type = 0,
    this.rocketLevel = 0,
    this.userId = '',
    this.roomId = '',
    this.toUserId = '',
    this.userAvatarUrl = '',
    this.toUserAvatarUrl = '',
    this.userName = '',
    this.toUserName = '',
    this.giftUrl = '',
    this.number = 0,
    this.coins = 0,
    this.priority = 10,
    this.multiple = 10,
  });

  SCFloatingMessage.fromJson(dynamic json) {
    userId = json['userId'];
    rocketLevel = json['rocketLevel'];
    toUserId = json['toUserId'];
    roomId = json['roomId'];
    type = json['type'];
    userAvatarUrl = json['userAvatarUrl'];
    toUserAvatarUrl = json['toUserAvatarUrl'];
    userName = json['userName'];
    toUserName = json['toUserName'];
    giftUrl = json['giftUrl'];
    coins = json['coins'];
    number = json['number'];
    priority = json['priority'];
    multiple = json['multiple'];
  }

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['userId'] = userId;
    map['rocketLevel'] = rocketLevel;
    map['roomId'] = roomId;
    map['type'] = type;
    map['toUserId'] = toUserId;
    map['userAvatarUrl'] = userAvatarUrl;
    map['toUserAvatarUrl'] = toUserAvatarUrl;
    map['userName'] = userName;
    map['toUserName'] = toUserName;
    map['giftUrl'] = giftUrl;
    map['coins'] = coins;
    map['number'] = number;
    map['priority'] = priority;
    map['multiple'] = multiple;
    return map;
  }
}
