-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
218 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
frontend/.gitignore | ||
node_modules | ||
dist | ||
dist-ssr | ||
target | ||
*.local | ||
frontend/docs/.vitepress/cache | ||
frontend/docs/.vitepress/.temp | ||
frontend/docs/api | ||
types | ||
.idea | ||
.DS_Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
{ | ||
"vue-i18n.i18nPaths": "src\\assets\\locales" | ||
} | ||
"vue-i18n.i18nPaths": "src\\assets\\locales", | ||
"rust-analyzer.linkedProjects": [ | ||
".\\backend\\kernel\\Cargo.toml" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod tt_table_props; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
use tardis::chrono::Utc; | ||
use tardis::db::sea_orm; | ||
use tardis::db::sea_orm::prelude::Json; | ||
use tardis::db::sea_orm::*; | ||
use tardis::{chrono, TardisCreateEntity, TardisEmptyBehavior, TardisEmptyRelation}; | ||
|
||
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, TardisCreateEntity, TardisEmptyBehavior, TardisEmptyRelation)] | ||
#[sea_orm(table_name = "tt_table_props")] | ||
pub struct Model { | ||
#[sea_orm(primary_key, auto_increment = false)] | ||
pub table_id: String, | ||
pub pk_column_name: String, | ||
pub parent_pk_column_name: String, | ||
pub columns: Json, | ||
pub layouts: Json, | ||
pub styles: Json, | ||
|
||
#[index] | ||
#[sea_orm(extra = "DEFAULT CURRENT_TIMESTAMP")] | ||
pub create_time: chrono::DateTime<Utc>, | ||
|
||
#[index] | ||
#[sea_orm(extra = "DEFAULT CURRENT_TIMESTAMP")] | ||
pub update_time: chrono::DateTime<Utc>, | ||
|
||
#[fill_ctx(own_paths)] | ||
pub own_paths: String, | ||
#[fill_ctx(owner)] | ||
pub owner: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pub mod tt_data_dtos; | ||
pub mod tt_layout_dtos; | ||
pub mod tt_table_dtos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
use serde::{Serialize, Deserialize}; | ||
use tardis::serde_json::Value; | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct TableDataFilterReq { | ||
items: Vec<TableDataFilterItemReq>, | ||
and: bool, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct TableDataFilterItemReq { | ||
column_name: String, | ||
operator: String, | ||
value: Option<Value>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct TableDataSortReq { | ||
column_name: String, | ||
order_desc: bool, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct TableDataGroupReq { | ||
column_names: Vec<String>, | ||
group_order_desc: bool, | ||
hide_empty_record: bool, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct TableDataSliceReq { | ||
offset_number: i32, | ||
fetch_number: i32, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct TableDataResp { | ||
records: Vec<Value>, | ||
aggs: Value, | ||
total_number: i32, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct TableDataGroupResp { | ||
records: Vec<Value>, | ||
aggs: Value, | ||
total_number: i32, | ||
group_value: String, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct TableCellDictItem { | ||
title: String, | ||
value: Value, | ||
color: Option<String>, | ||
avatar: Option<String>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct TableCellDictItemResp { | ||
records: Vec<TableCellDictItem>, | ||
total_number: i32, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
use std::collections::HashMap; | ||
|
||
use serde::{Deserialize, Serialize}; | ||
use tardis::serde_json::Value; | ||
|
||
use super::tt_data_dtos::{TableDataFilterReq, TableDataGroupReq, TableDataSortReq}; | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct TableLayoutProps { | ||
id: String, | ||
title: String, | ||
layout_kind: String, | ||
icon: Option<String>, | ||
columns: Vec<TableLayoutColumnProps>, | ||
filters: Option<Vec<TableDataFilterReq>>, | ||
sorts: Option<Vec<TableDataSortReq>>, | ||
group: Option<TableDataGroupReq>, | ||
aggs: Option<HashMap<String, String>>, | ||
expand_data_pks: Option<Vec<Value>>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct TableLayoutColumnProps { | ||
name: String, | ||
wrap: Option<bool>, | ||
fixed: Option<bool>, | ||
width: Option<f64>, | ||
hide: Option<bool>, | ||
date_start: Option<bool>, | ||
date_end: Option<bool>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct TableLayoutModifyReq { | ||
id: Option<String>, | ||
title: Option<String>, | ||
icon: Option<String>, | ||
filters: Option<Vec<TableDataFilterReq>>, | ||
sorts: Option<Vec<TableDataSortReq>>, | ||
group: Option<TableDataGroupReq>, | ||
aggs: Option<HashMap<String, String>>, | ||
new_expand_data_pk: Option<Value>, | ||
delete_expand_data_pk: Option<Value>, | ||
fetch_data_number: Option<i32>, | ||
column_sorted_names: Option<(String, String)>, | ||
new_column: Option<TableLayoutColumnProps>, | ||
changed_column: Option<TableLayoutColumnProps>, | ||
deleted_column_name: Option<String>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
use serde::{Serialize, Deserialize}; | ||
|
||
use super::tt_layout_dtos::TableLayoutProps; | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct TableProps { | ||
parent_pk_column_name: Option<String>, | ||
columns: Vec<TableColumnProps>, | ||
layouts: Option<Vec<TableLayoutProps>>, | ||
styles: Option<TableStyleProps>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct TableColumnProps { | ||
name: String, | ||
icon: Option<String>, | ||
title: Option<String>, | ||
data_kind: Option<String>, | ||
data_editable: Option<bool>, | ||
use_dict: Option<bool>, | ||
dict_editable: Option<bool>, | ||
multi_value: Option<bool>, | ||
kind_date_time_format: Option<String>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
pub struct TableStyleProps { | ||
size: Option<String>, | ||
theme: Option<String>, | ||
table_class: Option<String>, | ||
header_class: Option<String>, | ||
row_class: Option<String>, | ||
cell_class: Option<String>, | ||
agg_class: Option<String>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
mod domain; | ||
pub mod dto; | ||
pub mod process; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
mod tt_basic_process; | ||
pub mod tt_cell_dict_process; | ||
pub mod tt_data_process; | ||
pub mod tt_layout_process; | ||
pub mod tt_table_process; |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.