61 lines
1.6 KiB
Dart
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;
|
|
}
|
|
}
|