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


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

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @description: 产品表
 * @tableName:   sys_product
 * @entityName:  sysProduct
 * @author: 	 llg
 * @history:	 1.0
 */
public class  SysProduct extends BaseEntity {
	/** 主键ID*/
	private String id;
	/** 产品编码 */
	private String code;
	/** 产品名称 */
	private String name;
	/** 产品分类 */
	private String classify;
	private String classifyName;
	/** 产品描述 */
	private String description;
	/** 出品公司 */
	private String productionCompany;
	/** 产品介绍图片 */
	private String picturePath;
	/** 系统类型 */
	private String sysType;
	/** 排序号 */
	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 List<SysProductVersion> sysProductVersionList;

	//页数 利用pageHelper
	private Integer pageNum;
	//数量 利用pageHelper
	private Integer pageSize;

	public String getId() {
		return id;
	}

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

	public String getCode() {
		return code;
	}

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

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getClassify() {
		return classify;
	}

	public void setClassify(String classify) {
		this.classify = classify;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getProductionCompany() {
		return productionCompany;
	}

	public void setProductionCompany(String productionCompany) {
		this.productionCompany = productionCompany;
	}

	public String getPicturePath() {
		return picturePath;
	}

	public void setPicturePath(String picturePath) {
		this.picturePath = picturePath;
	}

	public String getSysType() {
		return sysType;
	}

	public void setSysType(String sysType) {
		this.sysType = sysType;
	}

	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<SysProductVersion> getSysProductVersionList() {
		return sysProductVersionList;
	}

	public void setSysProductVersionList(List<SysProductVersion> sysProductVersionList) {
		this.sysProductVersionList = sysProductVersionList;
	}

	//创建新增产品信息
	public void setCreateProduct() {
		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 setUpdateProduct() {
		this.modifyTime = new Date();
		this.modifyUserId  = String.valueOf( StpUtil.getLoginId());
	}

	public Integer getPageNum() {
		return pageNum;
	}

	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	@Override
    public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public String getClassifyName() {
		return classifyName;
	}

	public void setClassifyName(String classifyName) {
		this.classifyName = classifyName;
	}

}
