-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfig.js
101 lines (100 loc) · 2.89 KB
/
config.js
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
exports.config = {
general: {
packageName: "com.zh.car",
db: {
host: "192.168.1.179",
port: 3306,
database: "zh_tourist",
username: "root",
password: "zh2018"
},
basePath: "/Users/panjing/Downloads/car-parent",
author: "panjing",
//自动创建文件夹
mkdirs: true
},
templates: [{
"template": "entity.fc",
"outSuffix": ".java",
"outPath": "/car-common/src/main/java/com/zh/car/entity",
"project": "car-common",
//覆盖文件
overwrite: true
}, {
"template": "mapper.fc",
"outSuffix": "Mapper.java",
"outPath": "/car-service/src/main/java/com/zh/car/dao",
"project": "car-service",
overwrite: true
}, {
"template": "mapper.xml.fc",
"outSuffix": "Mapper.xml",
"outPath": "/car-service/src/main/resources/mybatis/mapper",
overwrite: true
}, {
"template": "service.fc",
"outSuffix": "Service.java",
"outPath": "/car-common/src/main/java/com/zh/car/service",
"project": "car-common"
}, {
"template": "serviceImpl.fc",
"outSuffix": "ServiceImpl.java",
"outPath": "/car-service/src/main/java/com/zh/car/service/impl",
"project": "car-service"
}, {
"template": "controller.fc",
"outSuffix": "Controller.java",
"outPath": "/car-api/src/main/java/com/zh/car/api/controller",
"project": "car-api"
}
],
//数据库类型对代码类型的映射
typeMappers: {
longs: {
//包名
package: 'java.lang.Long',
//简写类型名
typeName: 'Long',
//数据库类型
types: ["SMALLINT", "MEDIUMINT", "BIGINT"]
},
strings: {
package: 'java.lang.String',
typeName: 'String',
types: ["VARCHAR", "CHAR", "TEXT", "MEDIUMTEXT"]
},
ints: {
package: 'java.lang.Integer',
typeName: "Integer",
types: ['TINYINT', "INTEGER", "INT", "BIT", "BOOLEAN"]
},
doubles: {
package: 'java.lang.Double',
typeName: 'Double',
types: ["FLOAT", "DOUBLE", "DECIMAL"]
},
dates: {
package: 'java.util.Date',
typeName: 'Date',
types: ["DATE", "TIME", "DATETIME", "TIMESTAMP", "YEAR"]
}
},
//模块
models: {
SysUser: {
table: 'sys_user',
remark: '系统用户',
url: 'sys/user'
},
// SysRole: {
// table: "sys_role",
// remark: '角色模块',
// url: 'sys/role',
// //引用其他模块的字段
// fields: [],
//
// //操作方法
// methods: {}
// }
}
}