33 lines
820 B
Go
33 lines
820 B
Go
|
package model
|
||
|
|
||
|
import "encoding/json"
|
||
|
|
||
|
type CorpConfig struct {
|
||
|
CorpId string `json:"corpid"`
|
||
|
EnterpriseAgent string `json:"enterprise_agent"`
|
||
|
EnterpriseSecret string `json:"enterprise_secret"`
|
||
|
ApproveAgent string `json:"approve_agent"`
|
||
|
ApproveSecret string `json:"approve_secret"`
|
||
|
PaySecret string `json:"pay_secret"`
|
||
|
PayAgent string `json:"pay_agent"`
|
||
|
TplIdCheckin string `json:"tplid_checkin"`
|
||
|
TplIdRefund string `json:"tplid_refund"`
|
||
|
TplIdVacation string `json:"tplid_vacation"`
|
||
|
TplIdPayment string `json:"tplid_payment"`
|
||
|
}
|
||
|
|
||
|
type Corp struct {
|
||
|
Id int64
|
||
|
Name string
|
||
|
Config string
|
||
|
CreateTime int64
|
||
|
UpdateTime int64
|
||
|
}
|
||
|
|
||
|
func (c *Corp) GetConfig() *CorpConfig {
|
||
|
var cfg CorpConfig
|
||
|
json.Unmarshal([]byte(c.Config), &cfg)
|
||
|
|
||
|
return &cfg
|
||
|
}
|