release: v0.6.1
This commit is contained in:
commit
877eef7f07
118 files changed
+46315
No files matched your search
@@ -0,0 +1,19 @@
|
||||
package message_model
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Message struct {
|
||||
Id string `json:"id" gorm:"type:uuid;primaryKey"`
|
||||
MessageID string `json:"message_id" gorm:"unique"`
|
||||
Timestamp string `json:"timestamp"`
|
||||
Status string `json:"status"`
|
||||
Source string `json:"source"`
|
||||
}
|
||||
|
||||
func (m *Message) BeforeCreate(tx *gorm.DB) (err error) {
|
||||
m.Id = uuid.New().String()
|
||||
return
|
||||
}
|
||||
Reference in new issue
Block a user