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

import cn.dev33.satoken.stp.StpUtil;
import com.hzya.frame.sys.appParameter.entity.SysAppParameter;
import com.hzya.frame.uuid.UUIDUtils;
import com.hzya.frame.web.entity.BaseEntity;

import java.util.Date;
import java.util.List;

/**
 * @description: 应用表
 * @tableName:   sys_app
 * @entityName:  sysApp
 * @author: 	 llg
 * @history:	 1.0
 */
public class  SysApp  extends BaseEntity {
	/** 主键ID*/
	private String id;
	/** 产品id */
	private String productId;
	/** 应用名称 */
	private String name;
	/** 应用编号 */
	private String code;
	/** 应用图标PC地址 */
	private String pcPath;
	/** 应用图标移动端地址 */
	private String phonePath;
	/** 登记产品编码 */
	private String registeredProductCode;
	/** 版本号 */
	private String versionNumber;
	/** 版本说明 */
	private String versionDescription;
	/** 应用说明 */
	private String appDescription;
	/** 应用标签 */
	private String appLabel;
	/** 应用服务商 */
	private String appServiceProvider;
	/** 接入方式 */
	private String accessMode;
	/** 排序号 */
	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 registeredProductCodeName;
	private String accessModeName;
	private String versionNumberName;

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

	//应用参数
	private List<SysAppParameter> sysAppParameterList;

	public String getProductId() {
		return productId;
	}

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

	public String getName() {
		return name;
	}

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

	public String getCode() {
		return code;
	}

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

	public String getPcPath() {
		return pcPath;
	}

	public void setPcPath(String pcPath) {
		this.pcPath = pcPath;
	}

	public String getPhonePath() {
		return phonePath;
	}

	public void setPhonePath(String phonePath) {
		this.phonePath = phonePath;
	}

	public String getRegisteredProductCode() {
		return registeredProductCode;
	}

	public void setRegisteredProductCode(String registeredProductCode) {
		this.registeredProductCode = registeredProductCode;
	}

	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 String getAppDescription() {
		return appDescription;
	}

	public void setAppDescription(String appDescription) {
		this.appDescription = appDescription;
	}

	public String getAppLabel() {
		return appLabel;
	}

	public void setAppLabel(String appLabel) {
		this.appLabel = appLabel;
	}

	public String getAppServiceProvider() {
		return appServiceProvider;
	}

	public void setAppServiceProvider(String appServiceProvider) {
		this.appServiceProvider = appServiceProvider;
	}

	public String getAccessMode() {
		return accessMode;
	}

	public void setAccessMode(String accessMode) {
		this.accessMode = accessMode;
	}

	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 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<SysAppParameter> getSysAppParameterList() {
		return sysAppParameterList;
	}

	public void setSysAppParameterList(List<SysAppParameter> sysAppParameterList) {
		this.sysAppParameterList = sysAppParameterList;
	}

	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 void setCreateApp() {
		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 setUpdateApp() {
		this.modifyTime = new Date();
		this.modifyUserId  = String.valueOf( StpUtil.getLoginId());
	}

	public String getRegisteredProductCodeName() {
		return registeredProductCodeName;
	}

	public void setRegisteredProductCodeName(String registeredProductCodeName) {
		this.registeredProductCodeName = registeredProductCodeName;
	}

	public String getAccessModeName() {
		return accessModeName;
	}

	public void setAccessModeName(String accessModeName) {
		this.accessModeName = accessModeName;
	}

	public String getVersionNumberName() {
		return versionNumberName;
	}

	public void setVersionNumberName(String versionNumberName) {
		this.versionNumberName = versionNumberName;
	}

	@Override
	public String getId() {
		return id;
	}

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

	@Override
	public String getSts() {
		return sts;
	}

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