package cn.estsh.i3plus.pojo.screen.bean;

import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * @author Wynne.Lu
 * @date 2021/3/11 下午12:29
 * @desc
 */
@Entity
@Table(name = "SCR_DATA_AUTH")
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@DynamicUpdate
@DynamicInsert
@Builder
@ApiModel("数据权限")
public class ScrDataAuth extends BaseBean implements Serializable {
    private static final long serialVersionUID = 8099384243374450186L;

    @Column(name = "SCREEN_CODE")
    @ApiModelProperty("页面代码")
    private String screenCode;

    @Column(name = "MODEL_CODE")
    @ApiModelProperty("model代码")
    private String modelCode;

    @Column(name = "MODEL_FIELD_CODE")
    @ApiModelProperty("model字段代码")
    private String modelFieldCode;

    @Column(name = "ROLE")
    @ApiModelProperty("可以访问的角色")
    private String role;

    @Column(name = "ACCESS_TYPE")
    @ApiModelProperty("访问类型")
    private Integer accessType;

    @Column(name = "AUTH_KIND_TYPE")
    @ApiModelProperty("行权限类型")
    private Integer authKindType;

    @Column(name="AUTH_VALUE")
    @ApiModelProperty("权限制")
    private String authValue;

    @Column(name = "MODEL_FIELD_CONDITION")
    @ApiModelProperty("model字段条件")
    private String modelFieldCondition;

    @Column(name = "AUTH_TYPE")
    @ApiModelProperty("权限类型 （行，列）")
    private Integer authType;


}
