Skip to content

Commit 86e6a33

Browse files
Merge pull request #18 from chenmingyong0423/feature/hook
hook: fix DefaultCreatedAt method for Model
2 parents 79ae991 + d97cd69 commit 86e6a33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

model.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (m *Model) DefaultId() {
4343
}
4444

4545
func (m *Model) DefaultCreatedAt() {
46-
if !m.CreatedAt.IsZero() {
46+
if m.CreatedAt.IsZero() {
4747
m.CreatedAt = time.Now().Local()
4848
}
4949
}

0 commit comments

Comments
 (0)