Files
CloudHome-Ops/lib/models/sys_config.dart

42 lines
865 B
Dart
Raw Normal View History

/// 系统参数配置模型。
///
/// 对应后端 /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,
};
}
}