feat: 完成基本的 model
This commit is contained in:
13
internal/model/model.go
Normal file
13
internal/model/model.go
Normal file
@ -0,0 +1,13 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func Init(ctx context.Context, tx *gorm.DB) error {
|
||||
return tx.AutoMigrate(
|
||||
&Todo{},
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user