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
+86
View File
@@ -0,0 +1,86 @@
// Code generated by ent, DO NOT EDIT.
package visit
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the visit type in the database.
Label = "visit"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldPath holds the string denoting the path field in the database.
FieldPath = "path"
// FieldIP holds the string denoting the ip field in the database.
FieldIP = "ip"
// FieldUserAgent holds the string denoting the user_agent field in the database.
FieldUserAgent = "user_agent"
// FieldReferer holds the string denoting the referer field in the database.
FieldReferer = "referer"
// FieldVisitTime holds the string denoting the visit_time field in the database.
FieldVisitTime = "visit_time"
// Table holds the table name of the visit in the database.
Table = "visits"
)
// Columns holds all SQL columns for visit fields.
var Columns = []string{
FieldID,
FieldPath,
FieldIP,
FieldUserAgent,
FieldReferer,
FieldVisitTime,
}
// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
for i := range Columns {
if column == Columns[i] {
return true
}
}
return false
}
var (
// DefaultVisitTime holds the default value on creation for the "visit_time" field.
DefaultVisitTime func() time.Time
)
// OrderOption defines the ordering options for the Visit queries.
type OrderOption func(*sql.Selector)
// ByID orders the results by the id field.
func ByID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldID, opts...).ToFunc()
}
// ByPath orders the results by the path field.
func ByPath(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPath, opts...).ToFunc()
}
// ByIP orders the results by the ip field.
func ByIP(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIP, opts...).ToFunc()
}
// ByUserAgent orders the results by the user_agent field.
func ByUserAgent(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUserAgent, opts...).ToFunc()
}
// ByReferer orders the results by the referer field.
func ByReferer(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldReferer, opts...).ToFunc()
}
// ByVisitTime orders the results by the visit_time field.
func ByVisitTime(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldVisitTime, opts...).ToFunc()
}
+415
View File
@@ -0,0 +1,415 @@
// Code generated by ent, DO NOT EDIT.
package visit
import (
"home-vue-go/internal/ent/predicate"
"time"
"entgo.io/ent/dialect/sql"
)
// ID filters vertices based on their ID field.
func ID(id int) predicate.Visit {
return predicate.Visit(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.Visit {
return predicate.Visit(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.Visit {
return predicate.Visit(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.Visit {
return predicate.Visit(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.Visit {
return predicate.Visit(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.Visit {
return predicate.Visit(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.Visit {
return predicate.Visit(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.Visit {
return predicate.Visit(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.Visit {
return predicate.Visit(sql.FieldLTE(FieldID, id))
}
// Path applies equality check predicate on the "path" field. It's identical to PathEQ.
func Path(v string) predicate.Visit {
return predicate.Visit(sql.FieldEQ(FieldPath, v))
}
// IP applies equality check predicate on the "ip" field. It's identical to IPEQ.
func IP(v string) predicate.Visit {
return predicate.Visit(sql.FieldEQ(FieldIP, v))
}
// UserAgent applies equality check predicate on the "user_agent" field. It's identical to UserAgentEQ.
func UserAgent(v string) predicate.Visit {
return predicate.Visit(sql.FieldEQ(FieldUserAgent, v))
}
// Referer applies equality check predicate on the "referer" field. It's identical to RefererEQ.
func Referer(v string) predicate.Visit {
return predicate.Visit(sql.FieldEQ(FieldReferer, v))
}
// VisitTime applies equality check predicate on the "visit_time" field. It's identical to VisitTimeEQ.
func VisitTime(v time.Time) predicate.Visit {
return predicate.Visit(sql.FieldEQ(FieldVisitTime, v))
}
// PathEQ applies the EQ predicate on the "path" field.
func PathEQ(v string) predicate.Visit {
return predicate.Visit(sql.FieldEQ(FieldPath, v))
}
// PathNEQ applies the NEQ predicate on the "path" field.
func PathNEQ(v string) predicate.Visit {
return predicate.Visit(sql.FieldNEQ(FieldPath, v))
}
// PathIn applies the In predicate on the "path" field.
func PathIn(vs ...string) predicate.Visit {
return predicate.Visit(sql.FieldIn(FieldPath, vs...))
}
// PathNotIn applies the NotIn predicate on the "path" field.
func PathNotIn(vs ...string) predicate.Visit {
return predicate.Visit(sql.FieldNotIn(FieldPath, vs...))
}
// PathGT applies the GT predicate on the "path" field.
func PathGT(v string) predicate.Visit {
return predicate.Visit(sql.FieldGT(FieldPath, v))
}
// PathGTE applies the GTE predicate on the "path" field.
func PathGTE(v string) predicate.Visit {
return predicate.Visit(sql.FieldGTE(FieldPath, v))
}
// PathLT applies the LT predicate on the "path" field.
func PathLT(v string) predicate.Visit {
return predicate.Visit(sql.FieldLT(FieldPath, v))
}
// PathLTE applies the LTE predicate on the "path" field.
func PathLTE(v string) predicate.Visit {
return predicate.Visit(sql.FieldLTE(FieldPath, v))
}
// PathContains applies the Contains predicate on the "path" field.
func PathContains(v string) predicate.Visit {
return predicate.Visit(sql.FieldContains(FieldPath, v))
}
// PathHasPrefix applies the HasPrefix predicate on the "path" field.
func PathHasPrefix(v string) predicate.Visit {
return predicate.Visit(sql.FieldHasPrefix(FieldPath, v))
}
// PathHasSuffix applies the HasSuffix predicate on the "path" field.
func PathHasSuffix(v string) predicate.Visit {
return predicate.Visit(sql.FieldHasSuffix(FieldPath, v))
}
// PathEqualFold applies the EqualFold predicate on the "path" field.
func PathEqualFold(v string) predicate.Visit {
return predicate.Visit(sql.FieldEqualFold(FieldPath, v))
}
// PathContainsFold applies the ContainsFold predicate on the "path" field.
func PathContainsFold(v string) predicate.Visit {
return predicate.Visit(sql.FieldContainsFold(FieldPath, v))
}
// IPEQ applies the EQ predicate on the "ip" field.
func IPEQ(v string) predicate.Visit {
return predicate.Visit(sql.FieldEQ(FieldIP, v))
}
// IPNEQ applies the NEQ predicate on the "ip" field.
func IPNEQ(v string) predicate.Visit {
return predicate.Visit(sql.FieldNEQ(FieldIP, v))
}
// IPIn applies the In predicate on the "ip" field.
func IPIn(vs ...string) predicate.Visit {
return predicate.Visit(sql.FieldIn(FieldIP, vs...))
}
// IPNotIn applies the NotIn predicate on the "ip" field.
func IPNotIn(vs ...string) predicate.Visit {
return predicate.Visit(sql.FieldNotIn(FieldIP, vs...))
}
// IPGT applies the GT predicate on the "ip" field.
func IPGT(v string) predicate.Visit {
return predicate.Visit(sql.FieldGT(FieldIP, v))
}
// IPGTE applies the GTE predicate on the "ip" field.
func IPGTE(v string) predicate.Visit {
return predicate.Visit(sql.FieldGTE(FieldIP, v))
}
// IPLT applies the LT predicate on the "ip" field.
func IPLT(v string) predicate.Visit {
return predicate.Visit(sql.FieldLT(FieldIP, v))
}
// IPLTE applies the LTE predicate on the "ip" field.
func IPLTE(v string) predicate.Visit {
return predicate.Visit(sql.FieldLTE(FieldIP, v))
}
// IPContains applies the Contains predicate on the "ip" field.
func IPContains(v string) predicate.Visit {
return predicate.Visit(sql.FieldContains(FieldIP, v))
}
// IPHasPrefix applies the HasPrefix predicate on the "ip" field.
func IPHasPrefix(v string) predicate.Visit {
return predicate.Visit(sql.FieldHasPrefix(FieldIP, v))
}
// IPHasSuffix applies the HasSuffix predicate on the "ip" field.
func IPHasSuffix(v string) predicate.Visit {
return predicate.Visit(sql.FieldHasSuffix(FieldIP, v))
}
// IPEqualFold applies the EqualFold predicate on the "ip" field.
func IPEqualFold(v string) predicate.Visit {
return predicate.Visit(sql.FieldEqualFold(FieldIP, v))
}
// IPContainsFold applies the ContainsFold predicate on the "ip" field.
func IPContainsFold(v string) predicate.Visit {
return predicate.Visit(sql.FieldContainsFold(FieldIP, v))
}
// UserAgentEQ applies the EQ predicate on the "user_agent" field.
func UserAgentEQ(v string) predicate.Visit {
return predicate.Visit(sql.FieldEQ(FieldUserAgent, v))
}
// UserAgentNEQ applies the NEQ predicate on the "user_agent" field.
func UserAgentNEQ(v string) predicate.Visit {
return predicate.Visit(sql.FieldNEQ(FieldUserAgent, v))
}
// UserAgentIn applies the In predicate on the "user_agent" field.
func UserAgentIn(vs ...string) predicate.Visit {
return predicate.Visit(sql.FieldIn(FieldUserAgent, vs...))
}
// UserAgentNotIn applies the NotIn predicate on the "user_agent" field.
func UserAgentNotIn(vs ...string) predicate.Visit {
return predicate.Visit(sql.FieldNotIn(FieldUserAgent, vs...))
}
// UserAgentGT applies the GT predicate on the "user_agent" field.
func UserAgentGT(v string) predicate.Visit {
return predicate.Visit(sql.FieldGT(FieldUserAgent, v))
}
// UserAgentGTE applies the GTE predicate on the "user_agent" field.
func UserAgentGTE(v string) predicate.Visit {
return predicate.Visit(sql.FieldGTE(FieldUserAgent, v))
}
// UserAgentLT applies the LT predicate on the "user_agent" field.
func UserAgentLT(v string) predicate.Visit {
return predicate.Visit(sql.FieldLT(FieldUserAgent, v))
}
// UserAgentLTE applies the LTE predicate on the "user_agent" field.
func UserAgentLTE(v string) predicate.Visit {
return predicate.Visit(sql.FieldLTE(FieldUserAgent, v))
}
// UserAgentContains applies the Contains predicate on the "user_agent" field.
func UserAgentContains(v string) predicate.Visit {
return predicate.Visit(sql.FieldContains(FieldUserAgent, v))
}
// UserAgentHasPrefix applies the HasPrefix predicate on the "user_agent" field.
func UserAgentHasPrefix(v string) predicate.Visit {
return predicate.Visit(sql.FieldHasPrefix(FieldUserAgent, v))
}
// UserAgentHasSuffix applies the HasSuffix predicate on the "user_agent" field.
func UserAgentHasSuffix(v string) predicate.Visit {
return predicate.Visit(sql.FieldHasSuffix(FieldUserAgent, v))
}
// UserAgentIsNil applies the IsNil predicate on the "user_agent" field.
func UserAgentIsNil() predicate.Visit {
return predicate.Visit(sql.FieldIsNull(FieldUserAgent))
}
// UserAgentNotNil applies the NotNil predicate on the "user_agent" field.
func UserAgentNotNil() predicate.Visit {
return predicate.Visit(sql.FieldNotNull(FieldUserAgent))
}
// UserAgentEqualFold applies the EqualFold predicate on the "user_agent" field.
func UserAgentEqualFold(v string) predicate.Visit {
return predicate.Visit(sql.FieldEqualFold(FieldUserAgent, v))
}
// UserAgentContainsFold applies the ContainsFold predicate on the "user_agent" field.
func UserAgentContainsFold(v string) predicate.Visit {
return predicate.Visit(sql.FieldContainsFold(FieldUserAgent, v))
}
// RefererEQ applies the EQ predicate on the "referer" field.
func RefererEQ(v string) predicate.Visit {
return predicate.Visit(sql.FieldEQ(FieldReferer, v))
}
// RefererNEQ applies the NEQ predicate on the "referer" field.
func RefererNEQ(v string) predicate.Visit {
return predicate.Visit(sql.FieldNEQ(FieldReferer, v))
}
// RefererIn applies the In predicate on the "referer" field.
func RefererIn(vs ...string) predicate.Visit {
return predicate.Visit(sql.FieldIn(FieldReferer, vs...))
}
// RefererNotIn applies the NotIn predicate on the "referer" field.
func RefererNotIn(vs ...string) predicate.Visit {
return predicate.Visit(sql.FieldNotIn(FieldReferer, vs...))
}
// RefererGT applies the GT predicate on the "referer" field.
func RefererGT(v string) predicate.Visit {
return predicate.Visit(sql.FieldGT(FieldReferer, v))
}
// RefererGTE applies the GTE predicate on the "referer" field.
func RefererGTE(v string) predicate.Visit {
return predicate.Visit(sql.FieldGTE(FieldReferer, v))
}
// RefererLT applies the LT predicate on the "referer" field.
func RefererLT(v string) predicate.Visit {
return predicate.Visit(sql.FieldLT(FieldReferer, v))
}
// RefererLTE applies the LTE predicate on the "referer" field.
func RefererLTE(v string) predicate.Visit {
return predicate.Visit(sql.FieldLTE(FieldReferer, v))
}
// RefererContains applies the Contains predicate on the "referer" field.
func RefererContains(v string) predicate.Visit {
return predicate.Visit(sql.FieldContains(FieldReferer, v))
}
// RefererHasPrefix applies the HasPrefix predicate on the "referer" field.
func RefererHasPrefix(v string) predicate.Visit {
return predicate.Visit(sql.FieldHasPrefix(FieldReferer, v))
}
// RefererHasSuffix applies the HasSuffix predicate on the "referer" field.
func RefererHasSuffix(v string) predicate.Visit {
return predicate.Visit(sql.FieldHasSuffix(FieldReferer, v))
}
// RefererIsNil applies the IsNil predicate on the "referer" field.
func RefererIsNil() predicate.Visit {
return predicate.Visit(sql.FieldIsNull(FieldReferer))
}
// RefererNotNil applies the NotNil predicate on the "referer" field.
func RefererNotNil() predicate.Visit {
return predicate.Visit(sql.FieldNotNull(FieldReferer))
}
// RefererEqualFold applies the EqualFold predicate on the "referer" field.
func RefererEqualFold(v string) predicate.Visit {
return predicate.Visit(sql.FieldEqualFold(FieldReferer, v))
}
// RefererContainsFold applies the ContainsFold predicate on the "referer" field.
func RefererContainsFold(v string) predicate.Visit {
return predicate.Visit(sql.FieldContainsFold(FieldReferer, v))
}
// VisitTimeEQ applies the EQ predicate on the "visit_time" field.
func VisitTimeEQ(v time.Time) predicate.Visit {
return predicate.Visit(sql.FieldEQ(FieldVisitTime, v))
}
// VisitTimeNEQ applies the NEQ predicate on the "visit_time" field.
func VisitTimeNEQ(v time.Time) predicate.Visit {
return predicate.Visit(sql.FieldNEQ(FieldVisitTime, v))
}
// VisitTimeIn applies the In predicate on the "visit_time" field.
func VisitTimeIn(vs ...time.Time) predicate.Visit {
return predicate.Visit(sql.FieldIn(FieldVisitTime, vs...))
}
// VisitTimeNotIn applies the NotIn predicate on the "visit_time" field.
func VisitTimeNotIn(vs ...time.Time) predicate.Visit {
return predicate.Visit(sql.FieldNotIn(FieldVisitTime, vs...))
}
// VisitTimeGT applies the GT predicate on the "visit_time" field.
func VisitTimeGT(v time.Time) predicate.Visit {
return predicate.Visit(sql.FieldGT(FieldVisitTime, v))
}
// VisitTimeGTE applies the GTE predicate on the "visit_time" field.
func VisitTimeGTE(v time.Time) predicate.Visit {
return predicate.Visit(sql.FieldGTE(FieldVisitTime, v))
}
// VisitTimeLT applies the LT predicate on the "visit_time" field.
func VisitTimeLT(v time.Time) predicate.Visit {
return predicate.Visit(sql.FieldLT(FieldVisitTime, v))
}
// VisitTimeLTE applies the LTE predicate on the "visit_time" field.
func VisitTimeLTE(v time.Time) predicate.Visit {
return predicate.Visit(sql.FieldLTE(FieldVisitTime, v))
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.Visit) predicate.Visit {
return predicate.Visit(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.Visit) predicate.Visit {
return predicate.Visit(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.Visit) predicate.Visit {
return predicate.Visit(sql.NotPredicates(p))
}