package com.izouma.jmrh.domain;

import com.izouma.jmrh.annotations.Searchable;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.validation.constraints.Pattern;

@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
public class ArticleType extends AuditedEntity {

    @Id
    @Column(length = 50, unique = true)
    @ApiModelProperty("名称")
    @Searchable
    private String name;

    @Searchable
    @ApiModelProperty("描述")
    private String description;

    @ApiModelProperty("上级分类")
    private String parent;

    private int level;
}
