diff --git a/src/main/java/neatlogic/framework/deploy/dto/app/DeployAppEnvAutoConfigAuditVo.java b/src/main/java/neatlogic/framework/deploy/dto/app/DeployAppEnvAutoConfigAuditVo.java new file mode 100644 index 0000000000000000000000000000000000000000..b70f76db125acbe17f6f474f9c0ae7d02957e95f --- /dev/null +++ b/src/main/java/neatlogic/framework/deploy/dto/app/DeployAppEnvAutoConfigAuditVo.java @@ -0,0 +1,131 @@ +/*Copyright (C) 2023 深圳极向量科技有限公司 All Rights Reserved. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see .*/ + +package neatlogic.framework.deploy.dto.app; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.annotation.JSONField; +import neatlogic.framework.common.constvalue.ApiParamType; +import neatlogic.framework.common.dto.BaseEditorVo; +import neatlogic.framework.restful.annotation.EntityField; +import neatlogic.framework.util.SnowflakeUtil; + +import java.util.List; + +public class DeployAppEnvAutoConfigAuditVo extends BaseEditorVo { + private static final long serialVersionUID = -1948079785908118588L; + @EntityField(name = "common.id", type = ApiParamType.LONG) + private Long id; + @EntityField(name = "应用id", type = ApiParamType.LONG) + private Long appSystemId; + @EntityField(name = "模块id", type = ApiParamType.LONG) + private Long appModuleId; + @EntityField(name = "环境id", type = ApiParamType.LONG) + private Long envId; + @EntityField(name = "实例id", type = ApiParamType.LONG) + private Long instanceId = 0L; + @EntityField(name = "修改记录", type = ApiParamType.JSONOBJECT) + private JSONObject config; + @JSONField(serialize = false) + private String configStr; + + public DeployAppEnvAutoConfigAuditVo() { + } + + public DeployAppEnvAutoConfigAuditVo(Long appSystemId, Long appModuleId, Long envId) { + this.appSystemId = appSystemId; + this.appModuleId = appModuleId; + this.envId = envId; + } + + public DeployAppEnvAutoConfigAuditVo(Long appSystemId, Long appModuleId, Long envId, Long instanceId) { + this.appSystemId = appSystemId; + this.appModuleId = appModuleId; + this.envId = envId; + this.instanceId = instanceId; + } + + public DeployAppEnvAutoConfigAuditVo(Long appSystemId, Long appModuleId, Long envId, List keyValueList) { + this.appSystemId = appSystemId; + this.appModuleId = appModuleId; + this.envId = envId; + } + + public Long getId() { + if (id == null) { + id = SnowflakeUtil.uniqueLong(); + } + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getAppSystemId() { + return appSystemId; + } + + public void setAppSystemId(Long appSystemId) { + this.appSystemId = appSystemId; + } + + public Long getAppModuleId() { + return appModuleId; + } + + public void setAppModuleId(Long appModuleId) { + this.appModuleId = appModuleId; + } + + public Long getEnvId() { + return envId; + } + + public void setEnvId(Long envId) { + this.envId = envId; + } + + public Long getInstanceId() { + return instanceId; + } + + public void setInstanceId(Long instanceId) { + this.instanceId = instanceId; + } + + public JSONObject getConfig() { + if (config == null && configStr != null) { + config = JSON.parseObject(configStr); + } + return config; + } + + public void setConfig(JSONObject config) { + this.config = config; + } + + public String getConfigStr() { + if (configStr == null && config != null) { + configStr = config.toJSONString(); + } + return configStr; + } + + public void setConfigStr(String configStr) { + this.configStr = configStr; + } +}