package com.izouma.wenlvju.domain;

import io.swagger.annotations.ApiModel;
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 Setting extends BaseEntity {
    private Long parent;

    private String name;

    private String code;

    private int flag;

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