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

com.feingto.cloud.domain.account.ResourceColumn Maven / Gradle / Ivy

There is a newer version: 2.3.5.RELEASE
Show newest version
package com.feingto.cloud.domain.account;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.feingto.cloud.data.jpa.entity.IdEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;

/**
 * 菜单栏目
 *
 * @author longfei
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Entity
@DynamicUpdate
@Table(name = "sy_res_column")
public class ResourceColumn extends IdEntity {
    @JsonIgnoreProperties(value = "columns", allowSetters = true)
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "res_id")
    private Resource resource;

    @Column(nullable = false, length = 32)
    private String code;

    @Column(nullable = false, length = 64)
    private String name;

    @Column(nullable = false)
    private Integer location;

    @JsonIgnoreProperties(value = "column", allowSetters = true)
    @Fetch(FetchMode.SUBSELECT)
    @OneToMany(mappedBy = "column", fetch = FetchType.EAGER, cascade = CascadeType.REMOVE, orphanRemoval = true)
    private List rrcs = new ArrayList<>();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy