123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- package models
- import (
- "time"
- "shopperthree_manage_v2/client/mysql"
- )
- const (
- StatusNormal = 0
- StatusDelete = 1
- )
- const (
- VerifyPending = 0
- VerifyPassed = 1
- VerifyRejected = 2
- )
- const (
- OrderSkuSuccess = 0
- OrderSkuPay = 1
- OrderSkuPackSuccess = 2
- OrderSkuChange = 3
- OrderSkuRefund = 4
- OrderSkuCancel = 5
- )
- type CommonField struct {
- Id int `gorm:"primary_key;column:id"`
- CreatedAt time.Time `json:"created_at" gorm:"column:created_at;type:datetime;NOT NULL;index:idx_created_at;DEFAULT:CURRENT_TIMESTAMP"`
- UpdatedAt time.Time `json:"updated_at" gorm:"column:updated_at;type:datetime;NOT NULL;index:idx_updated_at;DEFAULT:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0)"`
- Status uint8 `json:"status" gorm:"column:status;NOT NULL;index:idx_status;default:0"`
- }
- func GetShortUUID() string {
- db := mysql.Client.Master()
- var uuid string
- db.Unscoped().Raw("SELECT UUID_SHORT()").Row().Scan(&uuid)
- return uuid
- }
|