package com.rf.psychological.group.dao.model;

import com.rf.psychological.base.model.BaseEntity;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

/**
 * @author lpf
 * @description:
 * @date 25/10/2021下午3:21
 */
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_group_auth", indexes = {
        @Index(columnList = "id", unique = true),
        @Index(columnList = "b_id,group_id")
})
@org.hibernate.annotations.Table(appliesTo = "t_group_auth", comment = "小组权限表")
public class GroupAuthEntity extends BaseEntity {

    @Column(name = "group_id", columnDefinition = "varchar(36) not null comment '小组id'")
    private String groupId;

    @Column(name = "b_id", columnDefinition = "varchar(50) comment '数据id，数据类型为0时是量表id，1时为认知任务id'")
    private String bId;

    @Column(name = "type", columnDefinition = "varchar(50) comment '数据类型：0-量表、1-认知任务'")
    private String type;

}
