124 lines
3.1 KiB
Dart
Raw Normal View History

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.channelType,
this.list,
this.pageNo,
this.pageSize,
this.pages,
this.total});
CustomSMSTemplateListData.fromJson(Map<String, dynamic> json) {
channelType = json['channelType'];
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? channelType;
List<CustomSMSTemplateItem>? list;
int? pageNo;
int? pageSize;
int? pages;
int? total;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['channelType'] = channelType;
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.channelType,
this.templateType,
this.name,
this.regards,
this.tips,
this.createdAt,
this.updatedAt,
this.langType,
this.template});
CustomSMSTemplateItem.fromJson(Map<String, dynamic> json) {
id = json['id'];
channelType = json['channelType'];
templateType = json['templateType'];
name = json['name'];
regards = json['regards'];
tips = json['tips'];
createdAt = json['created_at'];
updatedAt = json['updated_at'];
langType = json['langType'];
template = json['template'];
}
int? id;
int? channelType;
int? templateType;
String? name;
String? regards;
String? tips;
String? createdAt;
String? updatedAt;
int? langType;
String? template;
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['channelType'] = channelType;
data['templateType'] = templateType;
data['name'] = name;
data['regards'] = regards;
data['tips'] = tips;
data['created_at'] = createdAt;
data['updated_at'] = updatedAt;
data['langType'] = langType;
data['template'] = template;
return data;
}
}