refactor: 把 deleted_at 分离出来

This commit is contained in:
tiglog 2023-08-22 16:24:45 +08:00
parent d74d4a5348
commit 437cd18dc7
3 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,7 @@ type User struct {
ID int64
Name string
Timestamps
SoftDelete
}
func (u User) ConfigureEntity(e *EntityConfigurator) {

View File

@ -35,6 +35,7 @@ type Object struct {
ID int64
Name string
Timestamps
SoftDelete
}
func (o Object) ConfigureEntity(e *EntityConfigurator) {

View File

@ -14,5 +14,8 @@ import (
type Timestamps struct {
CreatedAt sql.NullTime
UpdatedAt sql.NullTime
}
type SoftDelete struct {
DeletedAt sql.NullTime
}