feat: add save
This commit is contained in:
12
backend/database/models/tenants.go
Normal file
12
backend/database/models/tenants.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"go.ipao.vip/gen/types"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// BeforeCreate
|
||||
func (m *Tenant) BeforeCreate(tx *gorm.DB) error {
|
||||
m.UUID = types.NewUUIDv4()
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user