init project

This commit is contained in:
admin committed 2026-11-11 17:49:38 +08:00
1 parent d63cc8d9f5
commit ee07869839
39 files changed
+1560 -622

No files matched your search

+6 -4
View File
@@ -1,8 +1,10 @@
package model
import "gorm.io/plugin/soft_delete"
type BaseModel struct {
Id int64 `json:"id" xorm:"pk autoincr 'id'"`
CreatedAt int64 `json:"created_at" xorm:"created"`
UpdatedAt int64 `json:"updated_at" xorm:"updated"`
DeletedAt int64 `json:"deleted_at" xorm:"deleted notnull"`
ID int64 `json:"id" gorm:"primaryKey;autoIncrement"`
CreatedAt int64 `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt int64 `json:"updated_at" gorm:"autoUpdateTime"`
DeletedAt soft_delete.DeletedAt `json:"deleted_at" gorm:"softDelete:second;not null;default:0;index"`
}
+7
View File
@@ -0,0 +1,7 @@
package model
type User struct {
BaseModel
Name string `json:"name" gorm:"size:100;not null"`
Status string `json:"status" gorm:"size:20;not null"`
}