refactor: 把 deleted_at 分离出来
This commit is contained in:
parent
d74d4a5348
commit
437cd18dc7
@ -22,6 +22,7 @@ type User struct {
|
||||
ID int64
|
||||
Name string
|
||||
Timestamps
|
||||
SoftDelete
|
||||
}
|
||||
|
||||
func (u User) ConfigureEntity(e *EntityConfigurator) {
|
||||
|
@ -35,6 +35,7 @@ type Object struct {
|
||||
ID int64
|
||||
Name string
|
||||
Timestamps
|
||||
SoftDelete
|
||||
}
|
||||
|
||||
func (o Object) ConfigureEntity(e *EntityConfigurator) {
|
||||
|
@ -14,5 +14,8 @@ import (
|
||||
type Timestamps struct {
|
||||
CreatedAt sql.NullTime
|
||||
UpdatedAt sql.NullTime
|
||||
}
|
||||
|
||||
type SoftDelete struct {
|
||||
DeletedAt sql.NullTime
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user