package com.izouma.wenlvju.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Where;

import javax.persistence.Entity;
import javax.persistence.Transient;
import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Where(clause = "del = 0")
@ApiModel(value = "艺术分类")
public class ArtType extends BaseEntity {
    @ApiModelProperty(value = "专业代码")
    private String code;

    private int level;

    private String name;

    private Long parent;

    private Long parent1;

    @Transient
    private List<ArtType> children = new ArrayList<>();
}
