feat: order action per status change
This commit is contained in:
20
app/model/orderStatusHistory.go
Normal file
20
app/model/orderStatusHistory.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"git.ma-al.com/goc_daniel/b2b/app/model/enums"
|
||||
)
|
||||
|
||||
type OrderStatusHistory struct {
|
||||
Id uint `gorm:"column:id;primaryKey;autoIncrement"`
|
||||
OrderId uint `gorm:"column:order_id;not null;index:idx_order_status_history_order"`
|
||||
OldStatus *enums.OrderStatus `gorm:"column:old_status;type:varchar(50)"`
|
||||
NewStatus enums.OrderStatus `gorm:"column:new_status;type:varchar(50);not null"`
|
||||
CreatedAt time.Time `gorm:"column:created_at;not null;autoCreateTime"`
|
||||
UserId uint `gorm:"column:user_id;index:idx_order_status_history_user;not null"`
|
||||
}
|
||||
|
||||
func (OrderStatusHistory) TableName() string {
|
||||
return "b2b_order_status_history"
|
||||
}
|
||||
Reference in New Issue
Block a user