package com.hzya.frame.sys.productVersion.entity;

import cn.dev33.satoken.stp.StpUtil;
import com.hzya.frame.sys.versionParameter.entity.SysVersionParameter;
import com.hzya.frame.uuid.UUIDUtils;
import com.hzya.frame.web.action.SessionContext;
import com.hzya.frame.web.entity.BaseEntity;

import java.util.Date;

import java.util.List;
/**
 * @description: 产品版本表
 * @tableName:   sys_product_version
 * @entityName:  sysProductVersion
 * @author: 	 llg
 * @history:	 1.0
 */
public class  SysProductVersion  extends BaseEntity {
	/** 主键ID*/
	private String id;
	/** 产品id */
	private String productId;
	/** 版本号 */
	private String versionNumber;
	/** 版本说明 */
	private String versionDescription;
	/** 排序号 */
	private Long sorts;
	/** 组织机构ID */
	private String orgId;
	/** 状态 1有效 0无效 */
	private String sts;
	/** 创建人ID*/
	private String createUserId;
	/** 创建时间ID */
	private Date createTime;
	/** 修改时间*/
	private Date modifyTime;
	/** 修改人ID*/
	private String modifyUserId;

	private String code;
	//版本参数
	private List<SysVersionParameter> sysVersionParameterList;
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getProductId() {
		return productId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}

	public String getVersionNumber() {
		return versionNumber;
	}

	public void setVersionNumber(String versionNumber) {
		this.versionNumber = versionNumber;
	}

	public String getVersionDescription() {
		return versionDescription;
	}

	public void setVersionDescription(String versionDescription) {
		this.versionDescription = versionDescription;
	}

	public Long getSorts() {
		return sorts;
	}

	public void setSorts(Long sorts) {
		this.sorts = sorts;
	}

	public String getOrgId() {
		return orgId;
	}

	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}

	public String getSts() {
		return sts;
	}

	public void setSts(String sts) {
		this.sts = sts;
	}

	public String getCreateUserId() {
		return createUserId;
	}

	public void setCreateUserId(String createUserId) {
		this.createUserId = createUserId;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public String getModifyUserId() {
		return modifyUserId;
	}

	public void setModifyUserId(String modifyUserId) {
		this.modifyUserId = modifyUserId;
	}

	public List<SysVersionParameter> getSysVersionParameterList() {
		return sysVersionParameterList;
	}

	public void setSysVersionParameterList(List<SysVersionParameter> sysVersionParameterList) {
		this.sysVersionParameterList = sysVersionParameterList;
	}

	public void setCreateProductVersion() {
		this.id = UUIDUtils.getUUID();
		this.orgId ="";
		this.sts = "Y";
		this.createUserId = String.valueOf( StpUtil.getLoginId());
		this.createTime = new Date();
		this.modifyTime = new Date();
		this.modifyUserId  = String.valueOf( StpUtil.getLoginId());
	}

	public void setUpdateProductVersion() {
		this.modifyTime = new Date();
		this.modifyUserId  = String.valueOf( StpUtil.getLoginId());
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

}


