25 lines
855 B
Go
25 lines
855 B
Go
package model
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/datatypes"
|
|
)
|
|
|
|
type HandoffRecord struct {
|
|
ID uint64 `gorm:"primaryKey" json:"id"`
|
|
OrderID uint64 `gorm:"not null;index" json:"order_id"`
|
|
FromUserID uint64 `gorm:"not null" json:"from_user_id"`
|
|
ToUserID uint64 `gorm:"not null" json:"to_user_id"`
|
|
Type string `gorm:"size:32;not null" json:"type"`
|
|
Content string `json:"content"`
|
|
AttachmentURLS datatypes.JSON `gorm:"column:attachment_urls" json:"attachment_urls"`
|
|
ConfirmedByRenterAt *time.Time `json:"confirmed_by_renter_at"`
|
|
ConfirmedByOwnerAt *time.Time `json:"confirmed_by_owner_at"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
func (HandoffRecord) TableName() string {
|
|
return "handoff_records"
|
|
}
|