-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenthemall-example.sh
More file actions
45 lines (29 loc) · 1.24 KB
/
genthemall-example.sh
File metadata and controls
45 lines (29 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env sh
### install genthemall
pip install genthemall
# generate project config file
genthemall project myProject ii2d.com
### SysUser
# add a module name sysUser and add field id type int.
genthemall field sysUser id type=int
# add field username type string, max length 40, min length 6.
genthemall field sysUser username type=string max=40 min=6
# add field password type string, max length 40, min length 8.
genthemall field sysUser password type=string max=40 min=8
# add field email type string.
genthemall field sysUser email type=string
# add field address type string
genthemall field sysUser address type=string
# add field sex type int
genthemall field sysUser sex type=int
### SysRole
# add a module name sysRole and add field id type int.
genthemall field sysRole id type=int
# add field roleName type string.
genthemall field sysRole roleName type=string
### Generate create database sql file
genthemall generate oracle.create_database "init.sql" -v --one-file && cat out/init.sql
# And then see the output. :)
### Generate java model file
genthemall generate java.model "src/main/java/\${config['path']}/model/\${module['pascalName']}.java" -v && cat out/src/main/java/com/ii2d/model/SysRole.java
# And then see the output. :)