Daisy caf62a7413 1,新增自定义短信模版列表接口对接
2,新增获取默认短信模版接口对接及相应逻辑处理
3,新增电子钥匙、密码模版相关逻辑及布局处理
4,新增添加短信模版(电子钥匙、密码)接口对接
5,修复新建短信模版点击报错不能展示问题
2024-06-04 14:44:04 +08:00

131 lines
3.2 KiB
Dart

class CustomSMSTemplateListEntity {
CustomSMSTemplateListEntity(
{this.errorCode, this.description, this.errorMsg, this.data});
CustomSMSTemplateListEntity.fromJson(Map<String, dynamic> json) {
errorCode = json['errorCode'];
description = json['description'];
errorMsg = json['errorMsg'];
data = json['data'] != null
? CustomSMSTemplateListData.fromJson(json['data'])
: null;
}
int? errorCode;
String? description;
String? errorMsg;
CustomSMSTemplateListData? 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 CustomSMSTemplateListData {
CustomSMSTemplateListData(
{this.type,
this.list,
this.pageNo,
this.pageSize,
this.pages,
this.total});
CustomSMSTemplateListData.fromJson(Map<String, dynamic> json) {
type = json['type'];
if (json['list'] != null) {
list = <CustomSMSTemplateItem>[];
json['list'].forEach((v) {
list!.add(CustomSMSTemplateItem.fromJson(v));
});
}
pageNo = json['pageNo'];
pageSize = json['pageSize'];
pages = json['pages'];
total = json['total'];
}
int? type;
List<CustomSMSTemplateItem>? list;
int? pageNo;
int? pageSize;
int? pages;
int? total;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['type'] = type;
if (list != null) {
data['list'] = list!.map((v) => v.toJson()).toList();
}
data['pageNo'] = pageNo;
data['pageSize'] = pageSize;
data['pages'] = pages;
data['total'] = total;
return data;
}
}
class CustomSMSTemplateItem {
CustomSMSTemplateItem(
{this.id,
this.userId,
this.type,
this.contentType,
this.name,
this.regards,
this.tips,
this.fixedKey,
this.createdAt,
this.updatedAt,
this.template,
this.fixedTemplate});
CustomSMSTemplateItem.fromJson(Map<String, dynamic> json) {
id = json['id'];
userId = json['user_id'];
type = json['type'];
contentType = json['content_type'];
name = json['name'];
regards = json['regards'];
tips = json['tips'];
fixedKey = json['fixed_key'];
createdAt = json['created_at'];
updatedAt = json['updated_at'];
template = json['template'];
fixedTemplate = json['fixed_template'];
}
int? id;
int? userId;
int? type;
int? contentType;
String? name;
String? regards;
String? tips;
String? fixedKey;
String? createdAt;
String? updatedAt;
String? template;
String? fixedTemplate;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['user_id'] = userId;
data['type'] = type;
data['content_type'] = contentType;
data['name'] = name;
data['regards'] = regards;
data['tips'] = tips;
data['fixed_key'] = fixedKey;
data['created_at'] = createdAt;
data['updated_at'] = updatedAt;
data['template'] = template;
data['fixed_template'] = fixedTemplate;
return data;
}
}