🔥A cross-language distributed transaction manager. Support xa, tcc, saga, transactional messages. 跨语言分布式事务管理器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

42 lines
768 B

package dtmsvr
import (
"time"
)
type M = map[string]interface{}
type ModelBase struct {
ID uint
CreateTime time.Time `gorm:"autoCreateTime"`
UpdateTime time.Time `gorm:"autoUpdateTime"`
}
type SagaModel struct {
ModelBase
Gid string `json:"gid"`
Steps string `json:"steps"`
TransQuery string `json:"trans_query"`
Status string `json:"status"`
FinishTime time.Time
RollbackTime time.Time
}
func (*SagaModel) TableName() string {
return "saga"
}
type SagaStepModel struct {
ModelBase
Gid string
Data string
Step int
Url string
Type string
Status string
FinishTime string
RollbackTime string
}
func (*SagaStepModel) TableName() string {
return "saga_step"
}