43 lines
844 B
Go
43 lines
844 B
Go
package config
|
|||
|
|
|
||
|
|
import (
|
||
|
|
xlog "bj_power_mes/common/logx"
|
||
|
|
"bj_power_mes/internal/db"
|
||
|
|
"bj_power_mes/internal/plc"
|
||
|
|
|
||
|
|
"github.com/zeromicro/go-zero/rest"
|
||
|
|
)
|
||
|
|
|
||
|
|
type Config struct {
|
||
|
|
rest.RestConf
|
||
|
|
Logger xlog.LogConf
|
||
|
|
Auth struct {
|
||
|
|
AccessSecret string
|
||
|
|
AccessExpire int
|
||
|
|
RefreshExpire int
|
||
|
|
}
|
||
|
|
|
||
|
|
Upload struct {
|
||
|
|
Dir string `json:",default=./uploads"`
|
||
|
|
RetentionDays int `json:",default=30"`
|
||
|
|
}
|
||
|
|
|
||
|
|
Database db.DatabaseConf
|
||
|
|
|
||
|
|
Plc plc.PlcConf `json:"PLC"`
|
||
|
|
|
||
|
|
Mock struct {
|
||
|
|
Enable bool `json:",default=false"`
|
||
|
|
MockRun bool `json:",default=false"`
|
||
|
|
}
|
||
|
|
|
||
|
|
MOM struct {
|
||
|
|
Enable bool `json:",default=false"`
|
||
|
|
BaseURL string `json:",default="`
|
||
|
|
InvOrgId int `json:",default=112"`
|
||
|
|
ResourceCode string `json:",default="`
|
||
|
|
InstoreType int `json:",default=1"`
|
||
|
|
PollInterval int `json:",default=60"`
|
||
|
|
}
|
||
|
|
}
|