feat: add save

This commit is contained in:
2025-12-16 14:26:31 +08:00
parent 4722eef72c
commit 512859b5c7
6 changed files with 34 additions and 20 deletions

View 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
}