|
@ -1,5 +1,7 @@
|
|
|
package com.yihu.quota.model.source;
|
|
|
|
|
|
import org.hibernate.annotations.Formula;
|
|
|
|
|
|
import javax.persistence.*;
|
|
|
|
|
|
/**
|
|
@ -11,11 +13,28 @@ import javax.persistence.*;
|
|
|
@Table(name = "olap_data_sources_table_field")
|
|
|
public class DataSourcesTableField {
|
|
|
private Integer id;
|
|
|
/**
|
|
|
* 表名Id
|
|
|
*/
|
|
|
private Integer tableId;
|
|
|
/**
|
|
|
* 字段名
|
|
|
*/
|
|
|
private String fieldName;
|
|
|
/**
|
|
|
* 字段类型
|
|
|
*/
|
|
|
private String fieldType;
|
|
|
/**
|
|
|
* 备注
|
|
|
*/
|
|
|
private String note;
|
|
|
|
|
|
/**
|
|
|
* 临时字段,字段所在表的名称
|
|
|
*/
|
|
|
private String tableName;
|
|
|
|
|
|
@Id
|
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
|
@Column(name = "id", unique = true, nullable = false)
|
|
@ -61,4 +80,13 @@ public class DataSourcesTableField {
|
|
|
public void setNote(String note) {
|
|
|
this.note = note;
|
|
|
}
|
|
|
|
|
|
@Formula("(SELECT tables.table_name FROM olap_data_sources_table_field filed Right JOIN olap_data_sources_table tables ON filed.table_id = tables.id WHERE filed.id = id)")
|
|
|
public String getTableName() {
|
|
|
return tableName;
|
|
|
}
|
|
|
|
|
|
public void setTableName(String tableName) {
|
|
|
this.tableName = tableName;
|
|
|
}
|
|
|
}
|