25 lines
338 B
Go
25 lines
338 B
Go
|
package model
|
||
|
|
||
|
import (
|
||
|
"admin/internal/db"
|
||
|
"gorm.io/gorm"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
db.RegisterTableModels(Order{})
|
||
|
}
|
||
|
|
||
|
type Order struct {
|
||
|
ID int `gorm:"primarykey"`
|
||
|
RoleID string
|
||
|
Account string
|
||
|
Price int
|
||
|
Currency int
|
||
|
GoodID int
|
||
|
|
||
|
CreatedAt time.Time
|
||
|
UpdatedAt time.Time
|
||
|
DeletedAt gorm.DeletedAt `gorm:"index"`
|
||
|
}
|