
package cn.ysk.cashier.system.domain;

import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Getter;
import lombok.Setter;
import cn.ysk.cashier.base.BaseEntity;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
* @author Zheng Jie
* @date 2019-04-10
*/
@Entity
@Getter
@Setter
@Table(name="sys_dict_detail")
public class DictDetail extends BaseEntity implements Serializable {

    @Id
    @Column(name = "detail_id")
    @NotNull(groups = Update.class)
    @ApiModelProperty(value = "ID", hidden = true)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @JoinColumn(name = "dict_id")
    @ManyToOne(fetch=FetchType.LAZY)
    @ApiModelProperty(value = "字典", hidden = true)
    private Dict dict;

    @Column(name = "dict_name")
    @ApiModelProperty(value = "字典标识")
    private String dictName;

    @ApiModelProperty(value = "字典名称")
    private String label;

    @ApiModelProperty(value = "字典值")
    private String value;

    @ApiModelProperty(value = "是否展示 0否 1是")
    private Integer status;

    @JoinColumn(name = "rele_id")
    @ApiModelProperty(value = "自关联id 三级时存在",hidden = true)
    private Integer releId;


    @ApiModelProperty(value = "排序")
    private Integer dictSort = 999;
}