/*
 *  Copyright 2019-2020 Zheng Jie
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package cn.ysk.cashier.system.domain;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import cn.ysk.cashier.base.BaseEntity;
import javax.persistence.*;
import javax.validation.constraints.NotBlank;
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")
public class Dict extends BaseEntity implements Serializable {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "`dict_id`")
    @ApiModelProperty(value = "ID")
    private Integer id;

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

    @Column(name = "`name`",nullable = false)
    @NotBlank
    @ApiModelProperty(value = "字典名称")
    private String name;

    @Column(name = "`is_child`")
    @ApiModelProperty(value = "是否有子类0否1是")
    private Integer isChild;

    @Column(name = "`rele_id`")
    @ApiModelProperty(value = "父id")
    private Integer releId;

    @Column(name = "`value`")
    @ApiModelProperty(value = "值")
    private String value;

    @Column(name = "`type`")
    @ApiModelProperty(value = "类型：通用-common；首页-home；热销-hot；")
    private String type;

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

    @Column(name = "`sort`")
    @ApiModelProperty(value = "排序")
    private Integer sort;
}