家政服务权限管理

hmxc
张萌 3 years ago
parent bb2cd11ac6
commit 1b1336e1c5

@ -1,13 +1,21 @@
enum HKAUTH {
///
SEND,
///
PICK,
///
HIDE }
class UserInfoModel {
int? id;
String? roleId;
String? nickName;
List<int>? jurisdiction;
///()
///()
bool get canSendTicket => jurisdiction!.contains(52);
///
///
bool get canPickUpTicket => jurisdiction!.contains(53);
///
@ -22,10 +30,21 @@ class UserInfoModel {
///
bool get canDecorationTrack => jurisdiction!.contains(60);
///
///
bool get manager => canSendTicket && canPickUpTicket;
UserInfoModel({required this.id, this.roleId, this.nickName, this.jurisdiction});
HKAUTH get houseKeepingAuthority {
if (jurisdiction!.contains(68)) {
return HKAUTH.PICK;
} else if (jurisdiction!.contains(67)) {
return HKAUTH.SEND;
} else {
return HKAUTH.HIDE;
}
}
UserInfoModel(
{required this.id, this.roleId, this.nickName, this.jurisdiction});
UserInfoModel.fromJson(Map<String, dynamic> json) {
id = json['id'];

Loading…
Cancel
Save