leaf-library-3/internal/entity/Model.go

16 lines
439 B
Go
Raw Normal View History

2024-12-05 17:44:29 +00:00
package entity
import (
"time"
2024-12-06 15:38:22 +00:00
"leafdev.top/Leaf/leaf-library-3/internal/types/dto"
2024-12-05 17:44:29 +00:00
)
// Model 是所有 entity 的基类,后期要将所有的 Base 改成这种形式
type Model struct {
2024-12-06 15:38:22 +00:00
Id dto.EntityId `gorm:"primarykey" json:"id"`
CreatedAt time.Time `gorm:"autoUpdateTime:milli" json:"created_at"`
UpdatedAt time.Time `gorm:"autoUpdateTime:milli" json:"updated_at"`
2024-12-05 17:44:29 +00:00
//DeletedAt gorm.DeletedAt `gorm:"index"`
}