package com.yuchen.saas.manage.system.api.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.nest.springwrap.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;


@Data
@ApiModel(value = "FeatureNewListVO", description = "FeatureNewListVO")
public class FeatureNewListVO {
	/**
	 * 父级功能
	 */
	@ApiModelProperty(name = "id", value = "父级功能")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;
	/**
	 * 父级功能
	 */
	@ApiModelProperty(name = "parentId", value = "父级功能")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long parentId;
	/**
	 * 排序
	 */
	@ApiModelProperty(name = "sort", value = "排序")
	private Integer sort;
	/**
	 * 备注
	 */
	@ApiModelProperty(name = "remark", value = "备注")
	private String remark;
	/**
	 * 功能类型
	 */
	@ApiModelProperty(name = "type", value = "功能类型（1：业务功能，2：通用功能，3：默认功能，4：平台管理）",required = true)
	@NotNull(message = "功能类型不能为空")
	private String type;

	/**
	 * 功能名称
	 */
	@ApiModelProperty(name = "name", value = "功能名称",required = true)
	@NotNull(message = "功能名称不能为空")
	private String name;
	/**
	 * 应用类型
	 */
	@ApiModelProperty(name = "applyType", value = "应用类型（多个，号隔开）1：pcWEB端，2：PC客户端，3：移动APP端，4：微信小程序，5：微信公众号，6：支付宝小程序，7：支付宝商户号")
	private String applyType;

	/**
	 * 功能编码
	 */
	@ApiModelProperty(name = "featureCode", value = "功能编码")
	private String featureCode;

	/**
	 * 应用id多个逗号隔开
	 */
	@ApiModelProperty(name = "applyId", value = "应用id多个逗号隔开")
	private String applyId;
	/**
	 * 是否权限分配（0：不可分配，1：可分配）
	 */
	@ApiModelProperty(name = "permissionEnable", value = "是否权限分配（0：不可分配，1：可分配）",required = true)
	@NotNull(message = "是否权限分配不能为空")
	private String permissionEnable;
	@ApiModelProperty(name = "usingObjects", value = "使用对象（1：平台客户，2：平台组织）")
	private String usingObjects;
	@ApiModelProperty(name = "featureGroupId", value = "分组id")
	private Long featureGroupId;
	/**
	 * 身份（admin：管理员，clerk：员工,operation：运营端）
	 * @see org.nest.springwrap.core.secure.enums.IdEntityEnum
	 */
	@ApiModelProperty(name = "idEntity", value = "身份（admin：管理员，clerk：员工,operation：运营端）")
	private String idEntity;
	@ApiModelProperty(name = "featureGroupName", value = "分组名称")
	private String featureGroupName;


	@ApiModelProperty(name = "updateUserName", value = "最近操作人姓名")
	private String updateUserName;
	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "创建部门")
	private Long createDept;


	@JsonSerialize(using = ToStringSerializer.class)
	@ApiModelProperty(value = "更新人")
	private Long updateUser;


	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
	@ApiModelProperty(value = "更新时间")
	private Date updateTime;


	@ApiModelProperty(value = "业务状态")
	private Integer status;


}
