2023-12-21 22:17:40 +08:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"service/codecreate/consts"
|
|
|
|
"service/codecreate/generator"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
genSource := &generator.GenSource{
|
2023-12-23 22:03:53 +08:00
|
|
|
EntityName: "ContactCustomerServiceSession",
|
|
|
|
ModuleName: "contact_customer_service_session",
|
|
|
|
EntityCNName: "联系客服对话表",
|
|
|
|
ErrCodeSeq: "24",
|
2023-12-21 22:17:40 +08:00
|
|
|
}
|
|
|
|
|
2023-12-23 22:03:53 +08:00
|
|
|
generator.CreateFileDirectory(genSource)
|
2023-12-21 22:17:40 +08:00
|
|
|
|
|
|
|
// genSource.InPath = consts.EntityInPath
|
|
|
|
// genSource.OutPath = fmt.Sprintf("%v%v%v.go", consts.RootPath, consts.EntityOutPath, genSource.ModuleName)
|
|
|
|
// generator.GenerateEntity(genSource)
|
|
|
|
|
|
|
|
// genSource.InPath = consts.IdGeneratorInPath
|
|
|
|
// genSource.OutPath = fmt.Sprintf("%v%v%v_idgenerator.go", consts.RootPath, consts.IdgeneratorOutPath, genSource.ModuleName)
|
|
|
|
// generator.GenerateModule(genSource)
|
|
|
|
|
|
|
|
// genSource.InPath = consts.MongoInPath
|
|
|
|
// genSource.OutPath = fmt.Sprintf("%v%v%v_mongo.go", consts.RootPath, consts.MongoOutPath, genSource.ModuleName)
|
|
|
|
// generator.GenerateModule(genSource)
|
|
|
|
|
2023-12-23 22:03:53 +08:00
|
|
|
genSource.InPath = consts.ProtoInPath
|
|
|
|
genSource.OutPath = fmt.Sprintf("%v%v%v/proto/%v_op.go", consts.RootPath, consts.ProtoOutPath, genSource.ModuleName, genSource.ModuleName)
|
|
|
|
generator.GenerateModule(genSource)
|
2023-12-21 22:17:40 +08:00
|
|
|
|
|
|
|
// genSource.InPath = consts.ServiceInPath
|
|
|
|
// genSource.OutPath = fmt.Sprintf("%v%v%v.go", consts.RootPath, consts.ServiceOutPath, genSource.ModuleName)
|
|
|
|
// generator.GenerateModule(genSource)
|
|
|
|
|
|
|
|
// genSource.InPath = consts.ServiceCenterInPath
|
|
|
|
// genSource.OutPath = fmt.Sprintf("%v%v%v_service_center.go", consts.RootPath, consts.ServiceCenterOutPath, genSource.ModuleName)
|
|
|
|
// generator.GenerateModule(genSource)
|
|
|
|
|
|
|
|
// genSource.InPath = consts.ErrCodeInPath
|
|
|
|
// genSource.OutPath = fmt.Sprintf("%v%v%v_errcode.go", consts.RootPath, consts.ErrcodeOutPath, genSource.ModuleName)
|
|
|
|
// generator.GenerateModule(genSource)
|
|
|
|
|
2023-12-23 22:03:53 +08:00
|
|
|
// genSource.InPath = consts.ControllerInPath
|
|
|
|
// genSource.OutPath = fmt.Sprintf("%v%v%v_op.go", consts.RootPath, consts.ControllerOutPath, genSource.ModuleName)
|
|
|
|
// generator.GenerateModule(genSource)
|
2023-12-21 22:17:40 +08:00
|
|
|
|
2023-12-23 22:03:53 +08:00
|
|
|
// genSource.InPath = consts.ControllerCenterInPath
|
|
|
|
// genSource.OutPath = fmt.Sprintf("%v%v%v_controller_center.go", consts.RootPath, consts.ControllerCenterOutPath, genSource.ModuleName)
|
|
|
|
// generator.GenerateModule(genSource)
|
2023-12-21 22:17:40 +08:00
|
|
|
|
|
|
|
}
|