-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gormgen.yaml
27 lines (27 loc) · 1.02 KB
/
.gormgen.yaml
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
# gorm gen models
version: "0.1"
database:
# consult[https://gorm.io/docs/connecting_to_the_database.html]"
dsn: "root:123456@tcp(127.0.0.1:3306)/telegraph?charset=utf8mb4&parseTime=true&loc=Local"
# input mysql or postgres or sqlite or sqlserver. consult[https://gorm.io/docs/connecting_to_the_database.html]
db: "mysql"
# enter the required data table or leave it blank.You can input : orders,users,goods
tables:
# only generate models (without query file)
onlyModel: true
# specify a directory for output
outPath: "./internal/apicore/data/query"
# query code file name, default: gen.go
outFile: ""
# generate unit test for query code
withUnitTest: false
# generated model code's package name
modelPkgName: ""
# generate with pointer when field is nullable
fieldNullable: true
# generate field with gorm index tag
fieldWithIndexTag: false
# generate field with gorm column type tag
fieldWithTypeTag: false
# detect integer field's unsigned type, adjust generated data type
fieldSignable: true