backend api, swagger, tooling, frontend skeleton
This commit is contained in:
151
backend/internal/data/ent/categorie/categorie.go
Normal file
151
backend/internal/data/ent/categorie/categorie.go
Normal file
@@ -0,0 +1,151 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package categorie
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the categorie type in the database.
|
||||
Label = "categorie"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldNom holds the string denoting the nom field in the database.
|
||||
FieldNom = "nom"
|
||||
// FieldParentID holds the string denoting the parent_id field in the database.
|
||||
FieldParentID = "parent_id"
|
||||
// FieldSlug holds the string denoting the slug field in the database.
|
||||
FieldSlug = "slug"
|
||||
// FieldIcone holds the string denoting the icone field in the database.
|
||||
FieldIcone = "icone"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
|
||||
FieldUpdatedAt = "updated_at"
|
||||
// EdgeParent holds the string denoting the parent edge name in mutations.
|
||||
EdgeParent = "parent"
|
||||
// EdgeEnfants holds the string denoting the enfants edge name in mutations.
|
||||
EdgeEnfants = "enfants"
|
||||
// Table holds the table name of the categorie in the database.
|
||||
Table = "categorie"
|
||||
// ParentTable is the table that holds the parent relation/edge.
|
||||
ParentTable = "categorie"
|
||||
// ParentColumn is the table column denoting the parent relation/edge.
|
||||
ParentColumn = "parent_id"
|
||||
// EnfantsTable is the table that holds the enfants relation/edge.
|
||||
EnfantsTable = "categorie"
|
||||
// EnfantsColumn is the table column denoting the enfants relation/edge.
|
||||
EnfantsColumn = "parent_id"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for categorie fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldNom,
|
||||
FieldParentID,
|
||||
FieldSlug,
|
||||
FieldIcone,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
}
|
||||
|
||||
// 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 (
|
||||
// NomValidator is a validator for the "nom" field. It is called by the builders before save.
|
||||
NomValidator func(string) error
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() time.Time
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
|
||||
DefaultUpdatedAt func() time.Time
|
||||
// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
|
||||
UpdateDefaultUpdatedAt func() time.Time
|
||||
// DefaultID holds the default value on creation for the "id" field.
|
||||
DefaultID func() uuid.UUID
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the Categorie 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()
|
||||
}
|
||||
|
||||
// ByNom orders the results by the nom field.
|
||||
func ByNom(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldNom, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByParentID orders the results by the parent_id field.
|
||||
func ByParentID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldParentID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySlug orders the results by the slug field.
|
||||
func BySlug(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSlug, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByIcone orders the results by the icone field.
|
||||
func ByIcone(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIcone, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUpdatedAt orders the results by the updated_at field.
|
||||
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByParentField orders the results by parent field.
|
||||
func ByParentField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newParentStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
|
||||
// ByEnfantsCount orders the results by enfants count.
|
||||
func ByEnfantsCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newEnfantsStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByEnfants orders the results by enfants terms.
|
||||
func ByEnfants(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newEnfantsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
func newParentStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, ParentTable, ParentColumn),
|
||||
)
|
||||
}
|
||||
func newEnfantsStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, EnfantsTable, EnfantsColumn),
|
||||
)
|
||||
}
|
||||
473
backend/internal/data/ent/categorie/where.go
Normal file
473
backend/internal/data/ent/categorie/where.go
Normal file
@@ -0,0 +1,473 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package categorie
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"gitea.maison43.duckdns.org/gilles/matosbox/internal/data/ent/predicate"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id uuid.UUID) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id uuid.UUID) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id uuid.UUID) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...uuid.UUID) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...uuid.UUID) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id uuid.UUID) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id uuid.UUID) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id uuid.UUID) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id uuid.UUID) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// Nom applies equality check predicate on the "nom" field. It's identical to NomEQ.
|
||||
func Nom(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEQ(FieldNom, v))
|
||||
}
|
||||
|
||||
// ParentID applies equality check predicate on the "parent_id" field. It's identical to ParentIDEQ.
|
||||
func ParentID(v uuid.UUID) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEQ(FieldParentID, v))
|
||||
}
|
||||
|
||||
// Slug applies equality check predicate on the "slug" field. It's identical to SlugEQ.
|
||||
func Slug(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEQ(FieldSlug, v))
|
||||
}
|
||||
|
||||
// Icone applies equality check predicate on the "icone" field. It's identical to IconeEQ.
|
||||
func Icone(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEQ(FieldIcone, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
||||
func UpdatedAt(v time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// NomEQ applies the EQ predicate on the "nom" field.
|
||||
func NomEQ(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEQ(FieldNom, v))
|
||||
}
|
||||
|
||||
// NomNEQ applies the NEQ predicate on the "nom" field.
|
||||
func NomNEQ(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNEQ(FieldNom, v))
|
||||
}
|
||||
|
||||
// NomIn applies the In predicate on the "nom" field.
|
||||
func NomIn(vs ...string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldIn(FieldNom, vs...))
|
||||
}
|
||||
|
||||
// NomNotIn applies the NotIn predicate on the "nom" field.
|
||||
func NomNotIn(vs ...string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNotIn(FieldNom, vs...))
|
||||
}
|
||||
|
||||
// NomGT applies the GT predicate on the "nom" field.
|
||||
func NomGT(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldGT(FieldNom, v))
|
||||
}
|
||||
|
||||
// NomGTE applies the GTE predicate on the "nom" field.
|
||||
func NomGTE(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldGTE(FieldNom, v))
|
||||
}
|
||||
|
||||
// NomLT applies the LT predicate on the "nom" field.
|
||||
func NomLT(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldLT(FieldNom, v))
|
||||
}
|
||||
|
||||
// NomLTE applies the LTE predicate on the "nom" field.
|
||||
func NomLTE(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldLTE(FieldNom, v))
|
||||
}
|
||||
|
||||
// NomContains applies the Contains predicate on the "nom" field.
|
||||
func NomContains(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldContains(FieldNom, v))
|
||||
}
|
||||
|
||||
// NomHasPrefix applies the HasPrefix predicate on the "nom" field.
|
||||
func NomHasPrefix(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldHasPrefix(FieldNom, v))
|
||||
}
|
||||
|
||||
// NomHasSuffix applies the HasSuffix predicate on the "nom" field.
|
||||
func NomHasSuffix(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldHasSuffix(FieldNom, v))
|
||||
}
|
||||
|
||||
// NomEqualFold applies the EqualFold predicate on the "nom" field.
|
||||
func NomEqualFold(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEqualFold(FieldNom, v))
|
||||
}
|
||||
|
||||
// NomContainsFold applies the ContainsFold predicate on the "nom" field.
|
||||
func NomContainsFold(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldContainsFold(FieldNom, v))
|
||||
}
|
||||
|
||||
// ParentIDEQ applies the EQ predicate on the "parent_id" field.
|
||||
func ParentIDEQ(v uuid.UUID) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEQ(FieldParentID, v))
|
||||
}
|
||||
|
||||
// ParentIDNEQ applies the NEQ predicate on the "parent_id" field.
|
||||
func ParentIDNEQ(v uuid.UUID) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNEQ(FieldParentID, v))
|
||||
}
|
||||
|
||||
// ParentIDIn applies the In predicate on the "parent_id" field.
|
||||
func ParentIDIn(vs ...uuid.UUID) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldIn(FieldParentID, vs...))
|
||||
}
|
||||
|
||||
// ParentIDNotIn applies the NotIn predicate on the "parent_id" field.
|
||||
func ParentIDNotIn(vs ...uuid.UUID) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNotIn(FieldParentID, vs...))
|
||||
}
|
||||
|
||||
// ParentIDIsNil applies the IsNil predicate on the "parent_id" field.
|
||||
func ParentIDIsNil() predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldIsNull(FieldParentID))
|
||||
}
|
||||
|
||||
// ParentIDNotNil applies the NotNil predicate on the "parent_id" field.
|
||||
func ParentIDNotNil() predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNotNull(FieldParentID))
|
||||
}
|
||||
|
||||
// SlugEQ applies the EQ predicate on the "slug" field.
|
||||
func SlugEQ(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEQ(FieldSlug, v))
|
||||
}
|
||||
|
||||
// SlugNEQ applies the NEQ predicate on the "slug" field.
|
||||
func SlugNEQ(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNEQ(FieldSlug, v))
|
||||
}
|
||||
|
||||
// SlugIn applies the In predicate on the "slug" field.
|
||||
func SlugIn(vs ...string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldIn(FieldSlug, vs...))
|
||||
}
|
||||
|
||||
// SlugNotIn applies the NotIn predicate on the "slug" field.
|
||||
func SlugNotIn(vs ...string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNotIn(FieldSlug, vs...))
|
||||
}
|
||||
|
||||
// SlugGT applies the GT predicate on the "slug" field.
|
||||
func SlugGT(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldGT(FieldSlug, v))
|
||||
}
|
||||
|
||||
// SlugGTE applies the GTE predicate on the "slug" field.
|
||||
func SlugGTE(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldGTE(FieldSlug, v))
|
||||
}
|
||||
|
||||
// SlugLT applies the LT predicate on the "slug" field.
|
||||
func SlugLT(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldLT(FieldSlug, v))
|
||||
}
|
||||
|
||||
// SlugLTE applies the LTE predicate on the "slug" field.
|
||||
func SlugLTE(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldLTE(FieldSlug, v))
|
||||
}
|
||||
|
||||
// SlugContains applies the Contains predicate on the "slug" field.
|
||||
func SlugContains(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldContains(FieldSlug, v))
|
||||
}
|
||||
|
||||
// SlugHasPrefix applies the HasPrefix predicate on the "slug" field.
|
||||
func SlugHasPrefix(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldHasPrefix(FieldSlug, v))
|
||||
}
|
||||
|
||||
// SlugHasSuffix applies the HasSuffix predicate on the "slug" field.
|
||||
func SlugHasSuffix(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldHasSuffix(FieldSlug, v))
|
||||
}
|
||||
|
||||
// SlugIsNil applies the IsNil predicate on the "slug" field.
|
||||
func SlugIsNil() predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldIsNull(FieldSlug))
|
||||
}
|
||||
|
||||
// SlugNotNil applies the NotNil predicate on the "slug" field.
|
||||
func SlugNotNil() predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNotNull(FieldSlug))
|
||||
}
|
||||
|
||||
// SlugEqualFold applies the EqualFold predicate on the "slug" field.
|
||||
func SlugEqualFold(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEqualFold(FieldSlug, v))
|
||||
}
|
||||
|
||||
// SlugContainsFold applies the ContainsFold predicate on the "slug" field.
|
||||
func SlugContainsFold(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldContainsFold(FieldSlug, v))
|
||||
}
|
||||
|
||||
// IconeEQ applies the EQ predicate on the "icone" field.
|
||||
func IconeEQ(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEQ(FieldIcone, v))
|
||||
}
|
||||
|
||||
// IconeNEQ applies the NEQ predicate on the "icone" field.
|
||||
func IconeNEQ(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNEQ(FieldIcone, v))
|
||||
}
|
||||
|
||||
// IconeIn applies the In predicate on the "icone" field.
|
||||
func IconeIn(vs ...string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldIn(FieldIcone, vs...))
|
||||
}
|
||||
|
||||
// IconeNotIn applies the NotIn predicate on the "icone" field.
|
||||
func IconeNotIn(vs ...string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNotIn(FieldIcone, vs...))
|
||||
}
|
||||
|
||||
// IconeGT applies the GT predicate on the "icone" field.
|
||||
func IconeGT(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldGT(FieldIcone, v))
|
||||
}
|
||||
|
||||
// IconeGTE applies the GTE predicate on the "icone" field.
|
||||
func IconeGTE(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldGTE(FieldIcone, v))
|
||||
}
|
||||
|
||||
// IconeLT applies the LT predicate on the "icone" field.
|
||||
func IconeLT(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldLT(FieldIcone, v))
|
||||
}
|
||||
|
||||
// IconeLTE applies the LTE predicate on the "icone" field.
|
||||
func IconeLTE(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldLTE(FieldIcone, v))
|
||||
}
|
||||
|
||||
// IconeContains applies the Contains predicate on the "icone" field.
|
||||
func IconeContains(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldContains(FieldIcone, v))
|
||||
}
|
||||
|
||||
// IconeHasPrefix applies the HasPrefix predicate on the "icone" field.
|
||||
func IconeHasPrefix(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldHasPrefix(FieldIcone, v))
|
||||
}
|
||||
|
||||
// IconeHasSuffix applies the HasSuffix predicate on the "icone" field.
|
||||
func IconeHasSuffix(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldHasSuffix(FieldIcone, v))
|
||||
}
|
||||
|
||||
// IconeIsNil applies the IsNil predicate on the "icone" field.
|
||||
func IconeIsNil() predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldIsNull(FieldIcone))
|
||||
}
|
||||
|
||||
// IconeNotNil applies the NotNil predicate on the "icone" field.
|
||||
func IconeNotNil() predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNotNull(FieldIcone))
|
||||
}
|
||||
|
||||
// IconeEqualFold applies the EqualFold predicate on the "icone" field.
|
||||
func IconeEqualFold(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEqualFold(FieldIcone, v))
|
||||
}
|
||||
|
||||
// IconeContainsFold applies the ContainsFold predicate on the "icone" field.
|
||||
func IconeContainsFold(v string) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldContainsFold(FieldIcone, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||||
func CreatedAtGT(v time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||||
func CreatedAtLT(v time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||||
func UpdatedAtNEQ(v time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||||
func UpdatedAtIn(vs ...time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||||
func UpdatedAtNotIn(vs ...time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||||
func UpdatedAtGT(v time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||||
func UpdatedAtGTE(v time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||||
func UpdatedAtLT(v time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||||
func UpdatedAtLTE(v time.Time) predicate.Categorie {
|
||||
return predicate.Categorie(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// HasParent applies the HasEdge predicate on the "parent" edge.
|
||||
func HasParent() predicate.Categorie {
|
||||
return predicate.Categorie(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, ParentTable, ParentColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasParentWith applies the HasEdge predicate on the "parent" edge with a given conditions (other predicates).
|
||||
func HasParentWith(preds ...predicate.Categorie) predicate.Categorie {
|
||||
return predicate.Categorie(func(s *sql.Selector) {
|
||||
step := newParentStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasEnfants applies the HasEdge predicate on the "enfants" edge.
|
||||
func HasEnfants() predicate.Categorie {
|
||||
return predicate.Categorie(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, EnfantsTable, EnfantsColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasEnfantsWith applies the HasEdge predicate on the "enfants" edge with a given conditions (other predicates).
|
||||
func HasEnfantsWith(preds ...predicate.Categorie) predicate.Categorie {
|
||||
return predicate.Categorie(func(s *sql.Selector) {
|
||||
step := newEnfantsStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.Categorie) predicate.Categorie {
|
||||
return predicate.Categorie(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.Categorie) predicate.Categorie {
|
||||
return predicate.Categorie(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.Categorie) predicate.Categorie {
|
||||
return predicate.Categorie(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user