mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-21 03:15:14 +08:00
feat: live dm block
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
31
lib/models_new/live/live_dm_block/shield_info.dart
Normal file
31
lib/models_new/live/live_dm_block/shield_info.dart
Normal file
@@ -0,0 +1,31 @@
|
||||
import 'package:PiliPlus/models_new/live/live_dm_block/shield_rules.dart';
|
||||
import 'package:PiliPlus/models_new/live/live_dm_block/shield_user_list.dart';
|
||||
|
||||
class ShieldInfo {
|
||||
List<ShieldUserList>? shieldUserList;
|
||||
List<String>? keywordList;
|
||||
ShieldRules? shieldRules;
|
||||
bool? isBlock;
|
||||
int? blockExpired;
|
||||
|
||||
ShieldInfo({
|
||||
this.shieldUserList,
|
||||
this.keywordList,
|
||||
this.shieldRules,
|
||||
this.isBlock,
|
||||
this.blockExpired,
|
||||
});
|
||||
|
||||
factory ShieldInfo.fromJson(Map<String, dynamic> json) => ShieldInfo(
|
||||
shieldUserList: (json['shield_user_list'] as List<dynamic>?)
|
||||
?.map((e) => ShieldUserList.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
keywordList: (json['keyword_list'] as List?)?.cast(),
|
||||
shieldRules: json['shield_rules'] == null
|
||||
? null
|
||||
: ShieldRules.fromJson(
|
||||
json['shield_rules'] as Map<String, dynamic>),
|
||||
isBlock: json['is_block'] as bool?,
|
||||
blockExpired: json['block_expired'] as int?,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user