42 lines
865 B
Dart
42 lines
865 B
Dart
|
|
/// 系统参数配置模型。
|
||
|
|
///
|
||
|
|
/// 对应后端 /sys/config/* 接口的配置实体。
|
||
|
|
class SysConfig {
|
||
|
|
const SysConfig({
|
||
|
|
required this.id,
|
||
|
|
required this.paramKey,
|
||
|
|
required this.paramValue,
|
||
|
|
required this.remark,
|
||
|
|
});
|
||
|
|
|
||
|
|
/// 主键 ID。
|
||
|
|
final String id;
|
||
|
|
|
||
|
|
/// 参数键名。
|
||
|
|
final String paramKey;
|
||
|
|
|
||
|
|
/// 参数值。
|
||
|
|
final String paramValue;
|
||
|
|
|
||
|
|
/// 备注。
|
||
|
|
final String remark;
|
||
|
|
|
||
|
|
factory SysConfig.fromJson(Map<String, dynamic> json) {
|
||
|
|
return SysConfig(
|
||
|
|
id: json['id']?.toString() ?? '',
|
||
|
|
paramKey: json['paramKey']?.toString() ?? '',
|
||
|
|
paramValue: json['paramValue']?.toString() ?? '',
|
||
|
|
remark: json['remark']?.toString() ?? '',
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
Map<String, dynamic> toJson() {
|
||
|
|
return {
|
||
|
|
'id': id,
|
||
|
|
'paramKey': paramKey,
|
||
|
|
'paramValue': paramValue,
|
||
|
|
'remark': remark,
|
||
|
|
};
|
||
|
|
}
|
||
|
|
}
|