(_ *gorm.DB)
| 74 | } |
| 75 | |
| 76 | func (task *SystemTask) BeforeCreate(_ *gorm.DB) error { |
| 77 | now := common.GetTimestamp() |
| 78 | if task.CreatedAt == 0 { |
| 79 | task.CreatedAt = now |
| 80 | } |
| 81 | if task.UpdatedAt == 0 { |
| 82 | task.UpdatedAt = now |
| 83 | } |
| 84 | return nil |
| 85 | } |
| 86 | |
| 87 | func (lock *SystemTaskLock) BeforeCreate(_ *gorm.DB) error { |
| 88 | if lock.UpdatedAt == 0 { |
nothing calls this directly
no test coverage detected