package com.jeesite.modules.sso.entity;

import javax.validation.constraints.Size;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 应用接入列表Entity
 * @author yinet
 * @version 2022-06-14
 */
@Table(name="sso_app", alias="a", label="应用接入列表信息", columns={
		@Column(name="id", attrName="id", label="主键id", isPK=true),
		@Column(name="app_type", attrName="appType", label="应用类别"),
		@Column(name="app_name", attrName="appName", label="应用名称", queryType=QueryType.LIKE),
		@Column(name="callback_url", attrName="callbackUrl", label="回调地址"),
		@Column(name="app_key", attrName="appKey", label="应用key"),
		@Column(name="app_secretkey", attrName="appSecretkey", label="应用密码"),
		@Column(name="create_by", attrName="createBy", label="创建者", isInsert=false, isUpdate=false, isQuery=false),
		@Column(name="create_date", attrName="createDate", label="创建时间", isInsert=false, isUpdate=false, isQuery=false, isUpdateForce=true),
		@Column(name="update_by", attrName="updateBy", label="更新者", isInsert=false, isQuery=false),
		@Column(name="update_date", attrName="updateDate", label="更新时间", isInsert=false, isQuery=false, isUpdateForce=true),
		@Column(name="remarks", attrName="remarks", label="备注信息", queryType=QueryType.LIKE),
		@Column(name="app_image", attrName="appImage", label="应用头像"),
		@Column(name="affiliation", attrName="affiliation", label="所属机构"),
		@Column(name="access", attrName="access", label="接入方式"),
		@Column(name="is_recommend", attrName="isRecommend", label="是否推荐"),
		@Column(name="return_attribute", attrName="returnAttribute", label="返回属性"),
		@Column(name="authority", attrName="authority", label="权限"),
		@Column(name="app_status", attrName="appStatus", label="状态"),
		@Column(name="access_type", attrName="accessType", label="类型"),
	}, orderBy="a.update_date DESC"
)
public class SsoApp extends DataEntity<SsoApp> {
	
	private static final long serialVersionUID = 1L;
	private String appType;		// 应用类别
	private String appName;		// 应用名称
	private String callbackUrl;		// 回调地址
	private String appKey;		// 应用key
	private String appSecretkey;		// 应用密码
	private String appImage;		// 应用头像
	private String affiliation;		// 所属机构
	private String access;		// 接入方式
	private String returnAttribute;		// 返回属性
	private String authority;		// 权限
	private String appStatus;		// 状态

	public String getAccessType() {
		return accessType;
	}

	public void setAccessType(String accessType) {
		this.accessType = accessType;
	}

	private String accessType;		// 状态

	private String isRecommend;


	public String getIsRecommend() {
		return isRecommend;
	}

	public void setIsRecommend(String isRecommend) {
		this.isRecommend = isRecommend;
	}

	public SsoApp() {
		this(null);
	}
	
	public SsoApp(String id){
		super(id);
	}
	
	@Size(min=0, max=3, message="应用类别长度不能超过 3 个字符")
	public String getAppType() {
		return appType;
	}

	public void setAppType(String appType) {
		this.appType = appType;
	}
	
	@Size(min=0, max=255, message="应用名称长度不能超过 255 个字符")
	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}
	
	@Size(min=0, max=255, message="回调地址长度不能超过 255 个字符")
	public String getCallbackUrl() {
		return callbackUrl;
	}

	public void setCallbackUrl(String callbackUrl) {
		this.callbackUrl = callbackUrl;
	}
	
	@Size(min=0, max=255, message="应用key长度不能超过 255 个字符")
	public String getAppKey() {
		return appKey;
	}

	public void setAppKey(String appKey) {
		this.appKey = appKey;
	}
	
	@Size(min=0, max=255, message="应用密码长度不能超过 255 个字符")
	public String getAppSecretkey() {
		return appSecretkey;
	}

	public void setAppSecretkey(String appSecretkey) {
		this.appSecretkey = appSecretkey;
	}
	
	@Size(min=0, max=255, message="应用头像长度不能超过 255 个字符")
	public String getAppImage() {
		return appImage;
	}

	public void setAppImage(String appImage) {
		this.appImage = appImage;
	}
	
	@Size(min=0, max=255, message="所属机构长度不能超过 255 个字符")
	public String getAffiliation() {
		return affiliation;
	}

	public void setAffiliation(String affiliation) {
		this.affiliation = affiliation;
	}
	
	@Size(min=0, max=255, message="接入方式长度不能超过 255 个字符")
	public String getAccess() {
		return access;
	}

	public void setAccess(String access) {
		this.access = access;
	}
	
	@Size(min=0, max=255, message="返回属性长度不能超过 255 个字符")
	public String getReturnAttribute() {
		return returnAttribute;
	}

	public void setReturnAttribute(String returnAttribute) {
		this.returnAttribute = returnAttribute;
	}
	
	@Size(min=0, max=255, message="权限长度不能超过 255 个字符")
	public String getAuthority() {
		return authority;
	}

	public void setAuthority(String authority) {
		this.authority = authority;
	}
	
	@Size(min=0, max=255, message="状态长度不能超过 255 个字符")
	public String getAppStatus() {
		return appStatus;
	}

	public void setAppStatus(String appStatus) {
		this.appStatus = appStatus;
	}
	
}