Daisy e6592bf06b 1,新增邮件类型选择公用组件
2,新增获取电子钥匙通知模版API对接
3,完善电子钥匙发送成功后邮件通知相关页面及逻辑
4,根据后台返回电子钥匙类型显示短信、邮件通知
2024-06-11 17:55:00 +08:00

80 lines
2.0 KiB
Dart

class SendEmailNotificationEntity {
SendEmailNotificationEntity(
{this.errorCode, this.description, this.errorMsg, this.data});
SendEmailNotificationEntity.fromJson(Map<String, dynamic> json) {
errorCode = json['errorCode'];
description = json['description'];
errorMsg = json['errorMsg'];
data = json['data'] != null
? EmailNotificationData.fromJson(json['data'])
: null;
}
int? errorCode;
String? description;
String? errorMsg;
EmailNotificationData? data;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['errorCode'] = errorCode;
data['description'] = description;
data['errorMsg'] = errorMsg;
if (this.data != null) {
data['data'] = this.data!.toJson();
}
return data;
}
}
class EmailNotificationData {
EmailNotificationData({this.list});
EmailNotificationData.fromJson(Map<String, dynamic> json) {
if (json['list'] != null) {
list = <EmailNotificationItem>[];
json['list'].forEach((v) {
list!.add(EmailNotificationItem.fromJson(v));
});
}
}
List<EmailNotificationItem>? list;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
if (list != null) {
data['list'] =
list!.map((EmailNotificationItem v) => v.toJson()).toList();
}
return data;
}
}
class EmailNotificationItem {
EmailNotificationItem(
{this.type, this.name, this.template, this.isUse, this.fee});
EmailNotificationItem.fromJson(Map<String, dynamic> json) {
type = json['type'];
name = json['name'];
template = json['template'];
isUse = json['isUse'];
fee = json['fee'];
}
String? type;
String? name;
String? template;
int? isUse;
int? fee;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['type'] = type;
data['name'] = name;
data['template'] = template;
data['isUse'] = isUse;
data['fee'] = fee;
return data;
}
}