Daisy 9158ce71e7 1,新增获取邮件模版列表API对接及逻辑处理
2,新增获取默认邮件模版(电子钥匙、密码类型)API对接
2024-06-05 18:24:59 +08:00

61 lines
1.6 KiB
Dart

class NewSMSTemplateEntity {
NewSMSTemplateEntity(
{this.errorCode, this.description, this.errorMsg, this.dataList});
NewSMSTemplateEntity.fromJson(Map<String, dynamic> json) {
errorCode = json['errorCode'];
description = json['description'];
errorMsg = json['errorMsg'];
if (json['data'] != null) {
dataList = <SMSTemplateData>[];
json['data'].forEach((v) {
dataList!.add(SMSTemplateData.fromJson(v));
});
}
}
int? errorCode;
String? description;
String? errorMsg;
List<SMSTemplateData>? dataList;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['errorCode'] = errorCode;
data['description'] = description;
data['errorMsg'] = errorMsg;
if (dataList != null) {
data['data'] = dataList!.map((v) => v.toJson()).toList();
}
return data;
}
}
class SMSTemplateData {
SMSTemplateData(
{this.contentType, this.typeName, this.template, this.fixedKey});
SMSTemplateData.fromJson(Map<String, dynamic> json) {
contentType = json['content_type'];
typeName = json['typeName'];
template = json['template'];
fixedKey = json['fixed_key'];
}
int? contentType;
String? typeName;
String? template;
String? fixedKey;
String? regards = '';
String? tips = '';
int? id;
String? name;
int? type;
bool? isUpdate = false;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['content_type'] = contentType;
data['typeName'] = typeName;
data['template'] = template;
data['fixed_key'] = fixedKey;
return data;
}
}