-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
24 changed files
with
489 additions
and
240 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
# What is SeaORM Pro | ||
|
||
* An admin dashboard built on top of SeaORM & Seaography | ||
* Technology - React + GraphQL + Loco.rs | ||
* CRUD operations out of the box | ||
* Nested table for relational entities | ||
* Fully customizable frontend and backend source code | ||
* Supported database: MSSQL, MySQL, PostgreSQL, SQLite | ||
|
||
SeaORM Pro is now in closed-beta, and will be based on SeaORM 1.0, so the API surface will be stable and supported long term. We offer an Evaluation License and a Production License with two support tiers. If you are interested, please [contact us](https://forms.office.com/r/gWk7CU9yjV) for pricing information. | ||
SeaORM Pro is an admin dashboard that provides full CRUD interface for your SeaORM entities, includes a GraphQL interface to handles CRUD request. | ||
|
||
The source code of the frontend and backend are fully customizable and accessible. The tech stack includes a sleek Ant Design React frontend admin panel, Loco.rs Rust backend server, SeaORM object relational mapper to interact with your relational database and Seaography to extends entity that defines in SeaORM to serve as a GraphQL interface. | ||
|
||
There are two kinds of table view in SeaORM Pro, raw table view and composite table view. | ||
|
||
For raw table view, each raw table corresponds to a table in the relational database, by default it will display all columns with pagination. You can configure the displayed columns and other settings in a TOML file. | ||
|
||
For composite table view, this is where SeaORM Pro shine, data from parent-child tables are represented in collapsible table view. The configuration of each composite table view is specified in the TOML file. | ||
|
||
SeaORM Pro is now in closed-beta, and will be based on SeaORM 1.0, so the API surface will be stable and supported long term. We offer an Evaluation License and a Production License with two support tiers. |
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,6 +1,6 @@ | ||
# SeaORM Pro Free | ||
|
||
* Free trial | ||
[SeaORM Pro Free](https://github.com/SeaQL/sea-orm-pro-free) is a free trial of SeaORM Pro with following limitations: | ||
|
||
* Readonly admin dashboard | ||
* No access to frontend source code | ||
* Supported database: MSSQL, MySQL, PostgreSQL, SQLite |
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,5 +1,60 @@ | ||
# Database & Async Runtime | ||
|
||
* Using MSSQL database driver | ||
* Supported database: MSSQL, MySQL, PostgreSQL, SQLite | ||
* Supported async runtime: async-std, tokio | ||
First, go to `Cargo.toml` and find the line of `sea-orm` in the `[dependencies]` section. | ||
|
||
```toml title="Cargo.toml" | ||
sea-orm = { version = "1.1.0", features = [ <DATABASE_DRIVER>, <ASYNC_RUNTIME>, "macros" ] } | ||
``` | ||
|
||
You must choose a `DATABASE_DRIVER` and an `ASYNC_RUNTIME`. `macros` is needed if you use SeaORM's generated entities (most likely). | ||
|
||
## DATABASE_DRIVER | ||
|
||
You can choose one or more from: | ||
|
||
+ `sqlz-mssql` - SQLz MSSQL | ||
+ `sqlx-mysql` - SQLx MySQL and MariaDB | ||
+ `sqlx-postgres` - SQLx PostgreSQL | ||
+ `sqlx-sqlite` - SQLx SQLite | ||
|
||
See also: [SQLx docs](https://docs.rs/crate/sqlx/latest/features). | ||
|
||
:::tip SQL Server (MSSQL) backend | ||
|
||
The installation and configuration of MSSQL driver can be found [here](https://www.sea-ql.org/SeaORM-X/docs/install-and-config/database-and-async-runtime/). | ||
|
||
::: | ||
|
||
## ASYNC_RUNTIME | ||
|
||
You have to choose one from: | ||
|
||
`runtime-async-std-native-tls`, `runtime-tokio-native-tls`, `runtime-async-std-rustls`, `runtime-tokio-rustls` | ||
|
||
Basically, they are in the form of `runtime-ASYNC_RUNTIME-TLS_LIB`: | ||
|
||
+ `ASYNC_RUNTIME` can be [`async-std`](https://crates.io/crates/async-std) or [`tokio`](https://crates.io/crates/tokio) | ||
+ `TLS_LIB` can either be [`native-tls`](https://crates.io/crates/native-tls) or [`rustls`](https://crates.io/crates/rustls) | ||
|
||
1. Choose the ASYNC_RUNTIME corresponding to your Rust web framework: | ||
|
||
| ASYNC_RUNTIME | Web Framework | | ||
| :-----------: | :------------: | | ||
| `async-std` | [`Tide`](https://docs.rs/tide) | | ||
| `tokio` | [`Axum`](https://docs.rs/axum), [`Actix`](https://actix.rs/), [`Poem`](https://docs.rs/poem), [`Rocket`](https://rocket.rs/) | | ||
|
||
2. `native-tls` uses the platform's native security facilities, while `rustls` is an (almost) pure Rust implementation. | ||
|
||
## Extra features | ||
|
||
+ `debug-print` - print every SQL statement to logger | ||
+ `mock` - mock interface for unit testing | ||
+ `macros` - procedural macros for your convenient | ||
+ `with-chrono` - support [`chrono`](https://crates.io/crates/chrono) types | ||
+ `with-time` - support [`time`](https://crates.io/crates/time) types | ||
+ `with-json` - support [`serde-json`](https://crates.io/crates/serde-json) types | ||
+ `with-rust_decimal` - support [`rust_decimal`](https://crates.io/crates/rust_decimal) types | ||
+ `with-bigdecimal` - support [`bigdecimal`](https://crates.io/crates/bigdecimal) types | ||
+ `with-uuid` - support [`uuid`](https://crates.io/crates/uuid) types | ||
+ `postgres-array` - support array types in Postgres (automatically enabled when `sqlx-postgres` feature is turned on) | ||
+ `sea-orm-internal` - opt-in unstable internal APIs (for accessing re-export SQLx types) |
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,6 +1,17 @@ | ||
# Theme | ||
|
||
* `title`: title of admin dashboard | ||
* `logo`: file path of admin dashboard logo | ||
* `login_banner`: file path of admin dashboard login banner | ||
* `copyright`: copyright of admin dashboard | ||
```toml | ||
[site.theme] | ||
|
||
# Title of admin dashboard | ||
title = "SeaORM Pro FREE" | ||
|
||
# File path of admin dashboard logo | ||
logo = "/admin/favicon.ico" | ||
|
||
# File path of admin dashboard login banner | ||
login_banner = "/admin/logo.png" | ||
|
||
# Copyright of admin dashboard | ||
copyright = "Powered by SeaORM Pro" | ||
``` |
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,13 +1,54 @@ | ||
# Table | ||
|
||
* `columns`: column specific config | ||
* `title`: display title | ||
* `field`: name of the SQL column | ||
* `relation`: name of the SeaORM relation | ||
* `width`: display width | ||
* `input_type`: data type | ||
* `ellipsis`: clip long text | ||
* `all_columns`: show all columns including column not mention in the `columns` config | ||
* `page_size`: number of rows per page | ||
* `table_size`: display density | ||
* `name`: rename table title | ||
```toml | ||
[table] | ||
|
||
# Column specific config | ||
columns = [ | ||
{ | ||
# Display title | ||
title = "ID", | ||
|
||
# Name of the SQL column | ||
field = "product_id", | ||
|
||
# Column width | ||
width = 80 | ||
}, | ||
{ | ||
title = "Thumbnail", | ||
|
||
field = "thumb_nail_photo", | ||
|
||
# Data type | ||
input_type = "image", | ||
|
||
width = 120 | ||
}, | ||
{ | ||
title = "Product Category", | ||
|
||
field = "name", | ||
|
||
# Name of the SeaORM relation | ||
relation = "product_category", | ||
|
||
# Clip long text | ||
ellipsis = false, | ||
|
||
width = 180 | ||
}, | ||
] | ||
|
||
# Show all columns including column not mention in the `columns` config | ||
all_columns = false | ||
|
||
# Number of rows per page | ||
page_size = 20 | ||
|
||
# Display density, options: large, middle, small | ||
table_size = "middle" | ||
|
||
# Rename table title | ||
name = "Products" | ||
``` |
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,6 +1,24 @@ | ||
# View | ||
|
||
* `hidden_columns`: list of columns that are hidden on the view table | ||
* `order_by`: sorter of the view table | ||
* `field`: sort by which column | ||
* `order`: in ASC / DESC direction | ||
```toml | ||
[view] | ||
|
||
# List of columns that are hidden on the view table | ||
hidden_columns = [ | ||
"name_style", | ||
"suffix", | ||
"email_address", | ||
"phone", | ||
"rowguid", | ||
"modified_date", | ||
] | ||
|
||
# Sorter of the view table | ||
order_by = { | ||
# Sort by which column | ||
field = "customer_id", | ||
|
||
# Sort in ASC / DESC direction | ||
order = "desc" | ||
} | ||
``` |
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,4 +1,14 @@ | ||
# Create | ||
|
||
* `enable`: is create allowed for this table? | ||
* `hidden_columns`: list of columns that are hidden on the create form | ||
```toml | ||
[create] | ||
|
||
# Is create allowed for this table? | ||
enable = true | ||
|
||
# List of columns that are hidden on the create form | ||
hidden_columns = [ | ||
"created_at", | ||
"updated_at", | ||
] | ||
``` |
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,5 +1,20 @@ | ||
# Update | ||
|
||
* `enable`: is update allowed for this table? | ||
* `hidden_columns`: list of columns that are hidden on the update form | ||
* `readonly_columns`: list of columns that are readonly on the update form | ||
```toml | ||
[update] | ||
|
||
# Is update allowed for this table? | ||
enable = true | ||
|
||
# List of columns that are hidden on the update form | ||
hidden_columns = [ | ||
"created_at", | ||
"updated_at", | ||
] | ||
|
||
# List of columns that are readonly on the update form | ||
readonly_columns = [ | ||
"id", | ||
] | ||
``` | ||
|
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,8 @@ | ||
# Delete | ||
|
||
* `enable`: is delete allowed for this table? | ||
```toml | ||
[delete] | ||
|
||
# Is delete allowed for this table? | ||
enable = true | ||
``` |
95 changes: 88 additions & 7 deletions
95
sea-orm-pro/docs/05-composite-table-config/01-parent-table.md
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,9 +1,90 @@ | ||
# Parent Table | ||
|
||
* `name`: name of the parent table | ||
* `parent_config`: table config of the parent table | ||
* [`table`](04-raw-table-config/01-table.md) | ||
* [`view`](04-raw-table-config/02-view.md) | ||
* [`create`](04-raw-table-config/03-create.md) | ||
* [`update`](04-raw-table-config/04-update.md) | ||
* [`delete`](04-raw-table-config/05-delete.md) | ||
```toml | ||
[parent] | ||
|
||
# Name of the parent table | ||
name = "sales_order_header" | ||
|
||
|
||
# Table config of the parent table | ||
[parent.table] | ||
|
||
# Column specific config | ||
columns = [ | ||
{ title = "ID", field = "sales_order_id", width = 80 }, | ||
{ field = "order_date" }, | ||
{ field = "purchase_order_number" }, | ||
{ field = "account_number" }, | ||
{ field = "ship_method" }, | ||
{ field = "sub_total" }, | ||
{ field = "tax_amt" }, | ||
{ field = "freight" }, | ||
] | ||
|
||
# Show all columns including column not mention in the `columns` config | ||
all_columns = false | ||
|
||
# Number of rows per page | ||
page_size = 20 | ||
|
||
# Display density, options: large, middle, small | ||
table_size = "middle" | ||
|
||
# Rename table title | ||
name = "Sales Orders" | ||
|
||
|
||
# View config of the parent table | ||
[parent.view] | ||
|
||
# List of columns that are hidden on the view table | ||
hidden_columns = [ | ||
"modified_date", | ||
] | ||
|
||
# Sorter of the view table | ||
order_by = { | ||
# Sort by which column | ||
field = "id", | ||
|
||
# Sort in ASC / DESC direction | ||
order = "desc" | ||
} | ||
|
||
|
||
# Create config of the parent table | ||
[parent.create] | ||
|
||
# Is create allowed for this table? | ||
enable = true | ||
|
||
# List of columns that are hidden on the create form | ||
hidden_columns = [ | ||
"modified_date", | ||
] | ||
|
||
|
||
# Update config of the parent table | ||
[parent.update] | ||
|
||
# Is update allowed for this table? | ||
enable = true | ||
|
||
# List of columns that are hidden on the update form | ||
hidden_columns = [ | ||
"modified_date", | ||
] | ||
|
||
# List of columns that are readonly on the update form | ||
readonly_columns = [ | ||
"id", | ||
] | ||
|
||
|
||
# Delete config of the parent table | ||
[parent.delete] | ||
|
||
# Is delete allowed for this table? | ||
enable = true | ||
``` |
Oops, something went wrong.