Add files via upload

This commit is contained in:
QWQLwToo
2026-01-28 13:25:18 +08:00
committed by GitHub
parent 02f66ec447
commit 7030903eb6
77 changed files with 21573 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
package schema
import (
"entgo.io/ent"
"entgo.io/ent/schema/field"
"time"
)
// Visit 访问记录实体
type Visit struct {
ent.Schema
}
func (Visit) Fields() []ent.Field {
return []ent.Field{
field.Int("id"),
field.String("path").Comment("访问路径"),
field.String("ip").Comment("访问IP"),
field.String("user_agent").Optional().Comment("用户代理"),
field.String("referer").Optional().Comment("来源页面"),
field.Time("visit_time").Default(time.Now).Comment("访问时间"),
}
}
func (Visit) Edges() []ent.Edge {
return nil
}