Channel kick members

This commit is contained in:
2024-04-26 20:49:21 +08:00
parent 47c10a180a
commit 3a661b67c7
14 changed files with 302 additions and 25 deletions

View File

@ -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,
};
}