重命名 api 文件夹为 backend

This commit is contained in:
fish
2026-04-08 21:50:48 +08:00
parent 4055747c6e
commit 2063a2d757
15 changed files with 9 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package models
import (
"time"
"gorm.io/gorm"
)
// User 用户模型
type User struct {
ID uint `gorm:"primaryKey" json:"id"`
Name string `gorm:"size:100;not null" json:"name"`
Email string `gorm:"size:100;uniqueIndex;not null" json:"email"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
}
// TableName 指定表名
func (User) TableName() string {
return "users"
}