MCPcopy Create free account
hub / github.com/QuantumNous/new-api / BeforeCreate

Method BeforeCreate

model/system_task.go:87–92  ·  view source on GitHub ↗
(_ *gorm.DB)

Source from the content-addressed store, hash-verified

85}
86
87func (lock *SystemTaskLock) BeforeCreate(_ *gorm.DB) error {
88 if lock.UpdatedAt == 0 {
89 lock.UpdatedAt = common.GetTimestamp()
90 }
91 return nil
92}
93
94func GenerateSystemTaskID() (string, error) {
95 key, err := common.GenerateRandomCharsKey(32)

Callers

nothing calls this directly

Calls 1

GetTimestampFunction · 0.92

Tested by

no test coverage detected