All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xyz.erupt.jpa.model.BaseTree Maven / Gradle / Ivy

There is a newer version: 1.12.17
Show newest version
package xyz.erupt.jpa.model;

import lombok.Getter;
import lombok.Setter;
import xyz.erupt.annotation.EruptField;
import xyz.erupt.annotation.sub_field.Edit;
import xyz.erupt.annotation.sub_field.EditType;
import xyz.erupt.annotation.sub_field.View;
import xyz.erupt.annotation.sub_field.sub_edit.ReferenceTreeType;

import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;

/**
 * @author YuePeng
 * date 2018-10-11.
 */
@Deprecated
@Getter
@Setter
@MappedSuperclass
public class BaseTree extends BaseModel {

    @EruptField(
            views = @View(title = "名称"),
            edit = @Edit(
                    title = "名称",
                    notNull = true
            )
    )
    private String name;

    @ManyToOne
    @EruptField(
            edit = @Edit(
                    title = "上级",
                    type = EditType.REFERENCE_TREE,
                    referenceTreeType = @ReferenceTreeType(pid = "parent.id")
            )
    )
    private T parent;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy