MCPcopy Create free account
hub / github.com/cloudreve/cloudreve / defaults

Method defaults

ent/task_update.go:477–486  ·  view source on GitHub ↗

defaults sets the default values of the builder before save.

()

Source from the content-addressed store, hash-verified

475
476// defaults sets the default values of the builder before save.
477func (tuo *TaskUpdateOne) defaults() error {
478 if _, ok := tuo.mutation.UpdatedAt(); !ok {
479 if task.UpdateDefaultUpdatedAt == nil {
480 return fmt.Errorf("ent: uninitialized task.UpdateDefaultUpdatedAt (forgotten import ent/runtime?)")
481 }
482 v := task.UpdateDefaultUpdatedAt()
483 tuo.mutation.SetUpdatedAt(v)
484 }
485 return nil
486}
487
488// check runs all checks and user-defined validators on the builder.
489func (tuo *TaskUpdateOne) check() error {

Callers 1

SaveMethod · 0.95

Calls 2

UpdatedAtMethod · 0.65
SetUpdatedAtMethod · 0.45

Tested by

no test coverage detected