mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 13:47:09 +00:00
Co-authored-by: lxwcodemonkey
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DbSchema {
|
||||
|
||||
private String db;
|
||||
|
||||
private String table;
|
||||
|
||||
private String sql;
|
||||
|
||||
private List<DBColumn> dbColumns;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
import com.tencent.supersonic.headless.api.pojo.enums.FieldType;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FieldSchema {
|
||||
|
||||
private String columnName;
|
||||
|
||||
private String dataType;
|
||||
|
||||
private String comment;
|
||||
|
||||
private FieldType filedType;
|
||||
|
||||
private String name;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.tencent.supersonic.headless.api.pojo;
|
||||
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ModelSchema {
|
||||
|
||||
private String name;
|
||||
|
||||
private String bizName;
|
||||
|
||||
private String description;
|
||||
|
||||
private List<FieldSchema> filedSchemas;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.enums;
|
||||
|
||||
public enum FieldType {
|
||||
primary_key, foreign_key, data_time, dimension, measure;
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.tencent.supersonic.headless.api.pojo.request;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.tencent.supersonic.headless.api.pojo.Dim;
|
||||
import com.tencent.supersonic.headless.api.pojo.DrillDownDimension;
|
||||
import com.tencent.supersonic.headless.api.pojo.ModelDetail;
|
||||
import com.tencent.supersonic.headless.api.pojo.SchemaItem;
|
||||
@@ -41,13 +39,6 @@ public class ModelReq extends SchemaItem {
|
||||
|
||||
private Map<String, Object> ext;
|
||||
|
||||
public List<Dim> getTimeDimension() {
|
||||
if (modelDetail == null) {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return modelDetail.filterTimeDims();
|
||||
}
|
||||
|
||||
public String getViewer() {
|
||||
if (viewers == null) {
|
||||
return null;
|
||||
|
||||
@@ -3,7 +3,15 @@ package com.tencent.supersonic.headless.api.pojo.request;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ColumnReq {
|
||||
public class ModelSchemaReq {
|
||||
|
||||
private Long databaseId;
|
||||
|
||||
private String sql;
|
||||
|
||||
private String db;
|
||||
|
||||
private String table;
|
||||
|
||||
private boolean buildByLLM;
|
||||
}
|
||||
Reference in New Issue
Block a user