package com.izouma.zhirongip.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
@ApiModel(value = "参数设置")
@Where(clause = "del = 0")
public class Setting extends BaseEntity {

    private String name;

    private Long parent;

    private int flag;

    private Integer sort;

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

}
