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

com.feingto.cloud.domain.system.DictItem Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.feingto.cloud.domain.BaseEntity;
import com.feingto.cloud.domain.converters.ListPersistenceConverters;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.DynamicUpdate;

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

/**
 * 数据字典明项
 *
 * @author longfei
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Entity
@Table(name = "sy_dict_item")
@DynamicUpdate
public class DictItem extends BaseEntity {
    private static final long serialVersionUID = 2068280064227727073L;

    @JsonIgnoreProperties(value = "items", allowSetters = true)
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(nullable = false)
    private Dict dict;

    @Column
    private String k;

    @Column
    private String v;

    @Column
    private Integer location;

    @Column
    @ColumnDefault("true")
    private boolean enabled;

    @Convert(converter = ListPersistenceConverters.class)
    @Column(name = "relations", columnDefinition = "text")
    private List relations = new ArrayList<>();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy