mirror of
https://github.com/versia-pub/versia-go.git
synced 2026-03-13 04:29:15 +01:00
chore: init
This commit is contained in:
commit
320715f3e7
174 changed files with 42083 additions and 0 deletions
55
ent/image/image.go
Normal file
55
ent/image/image.go
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package image
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the image type in the database.
|
||||
Label = "image"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldURL holds the string denoting the url field in the database.
|
||||
FieldURL = "url"
|
||||
// FieldMimeType holds the string denoting the mimetype field in the database.
|
||||
FieldMimeType = "mime_type"
|
||||
// Table holds the table name of the image in the database.
|
||||
Table = "images"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for image fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldURL,
|
||||
FieldMimeType,
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// OrderOption defines the ordering options for the Image 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()
|
||||
}
|
||||
|
||||
// ByURL orders the results by the url field.
|
||||
func ByURL(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldURL, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMimeType orders the results by the mimeType field.
|
||||
func ByMimeType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMimeType, opts...).ToFunc()
|
||||
}
|
||||
208
ent/image/where.go
Normal file
208
ent/image/where.go
Normal file
|
|
@ -0,0 +1,208 @@
|
|||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package image
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"github.com/lysand-org/versia-go/ent/predicate"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int) predicate.Image {
|
||||
return predicate.Image(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.Image {
|
||||
return predicate.Image(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.Image {
|
||||
return predicate.Image(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.Image {
|
||||
return predicate.Image(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.Image {
|
||||
return predicate.Image(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.Image {
|
||||
return predicate.Image(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.Image {
|
||||
return predicate.Image(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.Image {
|
||||
return predicate.Image(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.Image {
|
||||
return predicate.Image(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// URL applies equality check predicate on the "url" field. It's identical to URLEQ.
|
||||
func URL(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldEQ(FieldURL, v))
|
||||
}
|
||||
|
||||
// MimeType applies equality check predicate on the "mimeType" field. It's identical to MimeTypeEQ.
|
||||
func MimeType(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldEQ(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// URLEQ applies the EQ predicate on the "url" field.
|
||||
func URLEQ(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldEQ(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLNEQ applies the NEQ predicate on the "url" field.
|
||||
func URLNEQ(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldNEQ(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLIn applies the In predicate on the "url" field.
|
||||
func URLIn(vs ...string) predicate.Image {
|
||||
return predicate.Image(sql.FieldIn(FieldURL, vs...))
|
||||
}
|
||||
|
||||
// URLNotIn applies the NotIn predicate on the "url" field.
|
||||
func URLNotIn(vs ...string) predicate.Image {
|
||||
return predicate.Image(sql.FieldNotIn(FieldURL, vs...))
|
||||
}
|
||||
|
||||
// URLGT applies the GT predicate on the "url" field.
|
||||
func URLGT(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldGT(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLGTE applies the GTE predicate on the "url" field.
|
||||
func URLGTE(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldGTE(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLLT applies the LT predicate on the "url" field.
|
||||
func URLLT(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldLT(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLLTE applies the LTE predicate on the "url" field.
|
||||
func URLLTE(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldLTE(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLContains applies the Contains predicate on the "url" field.
|
||||
func URLContains(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldContains(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLHasPrefix applies the HasPrefix predicate on the "url" field.
|
||||
func URLHasPrefix(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldHasPrefix(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLHasSuffix applies the HasSuffix predicate on the "url" field.
|
||||
func URLHasSuffix(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldHasSuffix(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLEqualFold applies the EqualFold predicate on the "url" field.
|
||||
func URLEqualFold(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldEqualFold(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLContainsFold applies the ContainsFold predicate on the "url" field.
|
||||
func URLContainsFold(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldContainsFold(FieldURL, v))
|
||||
}
|
||||
|
||||
// MimeTypeEQ applies the EQ predicate on the "mimeType" field.
|
||||
func MimeTypeEQ(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldEQ(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeNEQ applies the NEQ predicate on the "mimeType" field.
|
||||
func MimeTypeNEQ(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldNEQ(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeIn applies the In predicate on the "mimeType" field.
|
||||
func MimeTypeIn(vs ...string) predicate.Image {
|
||||
return predicate.Image(sql.FieldIn(FieldMimeType, vs...))
|
||||
}
|
||||
|
||||
// MimeTypeNotIn applies the NotIn predicate on the "mimeType" field.
|
||||
func MimeTypeNotIn(vs ...string) predicate.Image {
|
||||
return predicate.Image(sql.FieldNotIn(FieldMimeType, vs...))
|
||||
}
|
||||
|
||||
// MimeTypeGT applies the GT predicate on the "mimeType" field.
|
||||
func MimeTypeGT(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldGT(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeGTE applies the GTE predicate on the "mimeType" field.
|
||||
func MimeTypeGTE(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldGTE(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeLT applies the LT predicate on the "mimeType" field.
|
||||
func MimeTypeLT(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldLT(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeLTE applies the LTE predicate on the "mimeType" field.
|
||||
func MimeTypeLTE(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldLTE(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeContains applies the Contains predicate on the "mimeType" field.
|
||||
func MimeTypeContains(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldContains(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeHasPrefix applies the HasPrefix predicate on the "mimeType" field.
|
||||
func MimeTypeHasPrefix(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldHasPrefix(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeHasSuffix applies the HasSuffix predicate on the "mimeType" field.
|
||||
func MimeTypeHasSuffix(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldHasSuffix(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeEqualFold applies the EqualFold predicate on the "mimeType" field.
|
||||
func MimeTypeEqualFold(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldEqualFold(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeContainsFold applies the ContainsFold predicate on the "mimeType" field.
|
||||
func MimeTypeContainsFold(v string) predicate.Image {
|
||||
return predicate.Image(sql.FieldContainsFold(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.Image) predicate.Image {
|
||||
return predicate.Image(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.Image) predicate.Image {
|
||||
return predicate.Image(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.Image) predicate.Image {
|
||||
return predicate.Image(sql.NotPredicates(p))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue