Skip to content

Commit

Permalink
将 deleted_at 识别为软删除字段
Browse files Browse the repository at this point in the history
  • Loading branch information
hengwei-test committed Oct 10, 2024
1 parent 4b3bef2 commit 6a50045
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -1282,6 +1282,9 @@ func findDeletedField(mapper *Mapper, rType reflect.Type) *FieldInfo {
if structType.Index[idx].Name == "deleted" {
return structType.Index[idx]
}
if structType.Index[idx].Name == "deleted_at" {
return structType.Index[idx]
}
}
return nil
}
Expand Down

0 comments on commit 6a50045

Please sign in to comment.