ops-console v1.0.2 (versionCode 8) 源码入库
This commit is contained in:
41
lib/models/sys_config.dart
Normal file
41
lib/models/sys_config.dart
Normal file
@@ -0,0 +1,41 @@
|
||||
/// 系统参数配置模型。
|
||||
///
|
||||
/// 对应后端 /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,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user