feat: add repository code generator
This commit is contained in:
parent
fa48c7a2b4
commit
c15e69a6c4
7 changed files with 432 additions and 319 deletions
20
lib/generator_cli/src/models.rs
Normal file
20
lib/generator_cli/src/models.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// BASE MODELS
|
||||
use fully_pub::fully_pub;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[fully_pub]
|
||||
struct Model {
|
||||
name: String,
|
||||
table_name: String,
|
||||
fields: Vec<Field>
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[fully_pub]
|
||||
struct Field {
|
||||
name: String,
|
||||
rust_type: String,
|
||||
is_nullable: bool,
|
||||
is_unique: bool,
|
||||
is_primary: bool
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue