go test
This commit is contained in:
parent
0e82478564
commit
e69f764b37
@ -6,6 +6,7 @@ services:
|
|||||||
- '80:4005'
|
- '80:4005'
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app/dtm
|
- .:/app/dtm
|
||||||
|
command: ['sh', '-c', 'go build app/main.go && go test ./dtmsvr']
|
||||||
mysql:
|
mysql:
|
||||||
image: 'daocloud.io/mysql:5.7'
|
image: 'daocloud.io/mysql:5.7'
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@ -8,8 +8,8 @@ type M = map[string]interface{}
|
|||||||
|
|
||||||
type ModelBase struct {
|
type ModelBase struct {
|
||||||
ID uint
|
ID uint
|
||||||
CreateTime time.Time `gorm:"autoCreateTime"`
|
CreateTime *time.Time `gorm:"autoCreateTime"`
|
||||||
UpdateTime time.Time `gorm:"autoUpdateTime"`
|
UpdateTime *time.Time `gorm:"autoUpdateTime"`
|
||||||
}
|
}
|
||||||
type SagaModel struct {
|
type SagaModel struct {
|
||||||
ModelBase
|
ModelBase
|
||||||
@ -17,8 +17,8 @@ type SagaModel struct {
|
|||||||
Steps string `json:"steps"`
|
Steps string `json:"steps"`
|
||||||
TransQuery string `json:"trans_query"`
|
TransQuery string `json:"trans_query"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
FinishTime time.Time
|
FinishTime *time.Time
|
||||||
RollbackTime time.Time
|
RollbackTime *time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*SagaModel) TableName() string {
|
func (*SagaModel) TableName() string {
|
||||||
@ -33,8 +33,8 @@ type SagaStepModel struct {
|
|||||||
Url string
|
Url string
|
||||||
Type string
|
Type string
|
||||||
Status string
|
Status string
|
||||||
FinishTime string
|
FinishTime *time.Time
|
||||||
RollbackTime string
|
RollbackTime *time.Time
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*SagaStepModel) TableName() string {
|
func (*SagaStepModel) TableName() string {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user