feat: add create_time to db

This commit is contained in:
Simon Ding
2025-04-22 16:58:26 +08:00
parent 549aaf60ca
commit 1a3807acc9
41 changed files with 1165 additions and 29 deletions

View File

@@ -2,6 +2,7 @@ package schema
import (
"errors"
"time"
"entgo.io/ent"
"entgo.io/ent/schema/field"
@@ -34,6 +35,7 @@ func (DownloadClients) Fields() []ent.Field {
field.Bool("remove_completed_downloads").Default(true),
field.Bool("remove_failed_downloads").Default(true),
field.String("tags").Default(""),
field.Time("create_time").Optional().Default(time.Now).Immutable(),
}
}