这是基于vue-vben-admin 模板适用于abp Vnext的前端管理项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

53 lines
1.1 KiB

import 'package:get/get.dart';
import '../../models/notification.dart';
class NotifierManageState {
NotifierManageState({
required this.isEnabled,
required this.groups,
});
bool isEnabled;
List<NotificationGroup> groups;
NotificationGroup? find(String name) {
return groups.firstWhereOrNull((item) => item.name == name);
}
}
class NotificationGroup {
NotificationGroup({
required this.name,
required this.displayName,
required this.notifications,
});
String name;
String displayName;
List<Notification> notifications = [];
Notification? find(String name) {
return notifications.firstWhereOrNull((item) => item.name == name);
}
}
class Notification {
Notification({
required this.name,
required this.groupName,
required this.displayName,
required this.isSubscribed,
this.description,
required this.lifetime,
required this.type,
required this.contentType,
});
String name;
String groupName;
String displayName;
bool isSubscribed;
String? description;
NotificationLifetime lifetime;
NotificationType type;
NotificationContentType contentType;
}