✨ Channel kick members
This commit is contained in:
@ -62,4 +62,48 @@ class Channel {
|
||||
"account_id": accountId,
|
||||
"realm_id": realmId,
|
||||
};
|
||||
}
|
||||
|
||||
class ChannelMember {
|
||||
int id;
|
||||
DateTime createdAt;
|
||||
DateTime updatedAt;
|
||||
DateTime? deletedAt;
|
||||
int channelId;
|
||||
int accountId;
|
||||
Account account;
|
||||
int notify;
|
||||
|
||||
ChannelMember({
|
||||
required this.id,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
this.deletedAt,
|
||||
required this.channelId,
|
||||
required this.accountId,
|
||||
required this.account,
|
||||
required this.notify,
|
||||
});
|
||||
|
||||
factory ChannelMember.fromJson(Map<String, dynamic> json) => ChannelMember(
|
||||
id: json["id"],
|
||||
createdAt: DateTime.parse(json["created_at"]),
|
||||
updatedAt: DateTime.parse(json["updated_at"]),
|
||||
deletedAt: json["deleted_at"],
|
||||
channelId: json["channel_id"],
|
||||
accountId: json["account_id"],
|
||||
account: Account.fromJson(json["account"]),
|
||||
notify: json["notify"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"id": id,
|
||||
"created_at": createdAt.toIso8601String(),
|
||||
"updated_at": updatedAt.toIso8601String(),
|
||||
"deleted_at": deletedAt,
|
||||
"channel_id": channelId,
|
||||
"account_id": accountId,
|
||||
"account": account.toJson(),
|
||||
"notify": notify,
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user