forked from quickfixgo/quickfix
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gormstore_model.go
40 lines (35 loc) · 1.82 KB
/
gormstore_model.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package quickfix
import (
"time"
)
type GormSessions struct {
BeginString string `gorm:"column:beginstring;primaryKey;type:varchar(8)"`
SenderCompId string `gorm:"column:sendercompid;primaryKey;type:varchar(64)"`
SenderSubId string `gorm:"column:sendersubid;primaryKey;type:varchar(64)"`
SenderLocId string `gorm:"column:senderlocid;primaryKey;type:varchar(64)"`
TargetCompId string `gorm:"column:targetcompid;primaryKey;type:varchar(64)"`
TargetSubId string `gorm:"column:targetsubid;primaryKey;type:varchar(64)"`
TargetLocId string `gorm:"column:targetlocid;primaryKey;type:varchar(64)"`
SessionQualifier string `gorm:"column:session_qualifier;primaryKey;type:varchar(64)"`
CreationTime time.Time `gorm:"column:creation_time"`
IncomingSeqNum int `gorm:"column:incoming_seqnum"`
OutgoingSeqNum int `gorm:"column:outgoing_seqnum"`
}
func (g GormSessions) TableName() string {
return "sessions"
}
type GormMessages struct {
BeginString string `gorm:"column:beginstring;primaryKey;type:varchar(8)"`
SenderCompId string `gorm:"column:sendercompid;primaryKey;type:varchar(64)"`
SenderSubId string `gorm:"column:sendersubid;primaryKey;type:varchar(64)"`
SenderLocId string `gorm:"column:senderlocid;primaryKey;type:varchar(64)"`
TargetCompId string `gorm:"column:targetcompid;primaryKey;type:varchar(64)"`
TargetSubId string `gorm:"column:targetsubid;primaryKey;type:varchar(64)"`
TargetLocId string `gorm:"column:targetlocid;primaryKey;type:varchar(64)"`
SessionQualifier string `gorm:"column:session_qualifier;primaryKey;type:varchar(64)"`
Message string `gorm:"column:message;type:text"`
MsgSeqNum int64 `gorm:"column:msgseqnum;primaryKey"`
}
func (g GormMessages) TableName() string {
return "messages"
}