backend api, swagger, tooling, frontend skeleton
This commit is contained in:
177
backend/internal/data/ent/piecejointe/piecejointe.go
Normal file
177
backend/internal/data/ent/piecejointe/piecejointe.go
Normal file
@@ -0,0 +1,177 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package piecejointe
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the piecejointe type in the database.
|
||||
Label = "piece_jointe"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldObjetID holds the string denoting the objet_id field in the database.
|
||||
FieldObjetID = "objet_id"
|
||||
// FieldNomFichier holds the string denoting the nom_fichier field in the database.
|
||||
FieldNomFichier = "nom_fichier"
|
||||
// FieldChemin holds the string denoting the chemin field in the database.
|
||||
FieldChemin = "chemin"
|
||||
// FieldTypeMime holds the string denoting the type_mime field in the database.
|
||||
FieldTypeMime = "type_mime"
|
||||
// FieldEstPrincipale holds the string denoting the est_principale field in the database.
|
||||
FieldEstPrincipale = "est_principale"
|
||||
// FieldCategorie holds the string denoting the categorie field in the database.
|
||||
FieldCategorie = "categorie"
|
||||
// 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"
|
||||
// EdgeObjet holds the string denoting the objet edge name in mutations.
|
||||
EdgeObjet = "objet"
|
||||
// Table holds the table name of the piecejointe in the database.
|
||||
Table = "piece_jointe"
|
||||
// ObjetTable is the table that holds the objet relation/edge.
|
||||
ObjetTable = "piece_jointe"
|
||||
// ObjetInverseTable is the table name for the Objet entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "objet" package.
|
||||
ObjetInverseTable = "objet"
|
||||
// ObjetColumn is the table column denoting the objet relation/edge.
|
||||
ObjetColumn = "objet_id"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for piecejointe fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldObjetID,
|
||||
FieldNomFichier,
|
||||
FieldChemin,
|
||||
FieldTypeMime,
|
||||
FieldEstPrincipale,
|
||||
FieldCategorie,
|
||||
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 (
|
||||
// NomFichierValidator is a validator for the "nom_fichier" field. It is called by the builders before save.
|
||||
NomFichierValidator func(string) error
|
||||
// CheminValidator is a validator for the "chemin" field. It is called by the builders before save.
|
||||
CheminValidator func(string) error
|
||||
// TypeMimeValidator is a validator for the "type_mime" field. It is called by the builders before save.
|
||||
TypeMimeValidator func(string) error
|
||||
// DefaultEstPrincipale holds the default value on creation for the "est_principale" field.
|
||||
DefaultEstPrincipale bool
|
||||
// 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
|
||||
)
|
||||
|
||||
// Categorie defines the type for the "categorie" enum field.
|
||||
type Categorie string
|
||||
|
||||
// CategorieImage is the default value of the Categorie enum.
|
||||
const DefaultCategorie = CategorieImage
|
||||
|
||||
// Categorie values.
|
||||
const (
|
||||
CategorieImage Categorie = "image"
|
||||
CategoriePdfNotice Categorie = "pdf_notice"
|
||||
CategorieMarkdownTuto Categorie = "markdown_tuto"
|
||||
)
|
||||
|
||||
func (c Categorie) String() string {
|
||||
return string(c)
|
||||
}
|
||||
|
||||
// CategorieValidator is a validator for the "categorie" field enum values. It is called by the builders before save.
|
||||
func CategorieValidator(c Categorie) error {
|
||||
switch c {
|
||||
case CategorieImage, CategoriePdfNotice, CategorieMarkdownTuto:
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("piecejointe: invalid enum value for categorie field: %q", c)
|
||||
}
|
||||
}
|
||||
|
||||
// OrderOption defines the ordering options for the PieceJointe 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()
|
||||
}
|
||||
|
||||
// ByObjetID orders the results by the objet_id field.
|
||||
func ByObjetID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldObjetID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByNomFichier orders the results by the nom_fichier field.
|
||||
func ByNomFichier(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldNomFichier, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByChemin orders the results by the chemin field.
|
||||
func ByChemin(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldChemin, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTypeMime orders the results by the type_mime field.
|
||||
func ByTypeMime(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTypeMime, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByEstPrincipale orders the results by the est_principale field.
|
||||
func ByEstPrincipale(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEstPrincipale, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCategorie orders the results by the categorie field.
|
||||
func ByCategorie(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCategorie, 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()
|
||||
}
|
||||
|
||||
// ByObjetField orders the results by objet field.
|
||||
func ByObjetField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newObjetStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
func newObjetStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(ObjetInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, ObjetTable, ObjetColumn),
|
||||
)
|
||||
}
|
||||
455
backend/internal/data/ent/piecejointe/where.go
Normal file
455
backend/internal/data/ent/piecejointe/where.go
Normal file
@@ -0,0 +1,455 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package piecejointe
|
||||
|
||||
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.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id uuid.UUID) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id uuid.UUID) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...uuid.UUID) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...uuid.UUID) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id uuid.UUID) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id uuid.UUID) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id uuid.UUID) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id uuid.UUID) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// ObjetID applies equality check predicate on the "objet_id" field. It's identical to ObjetIDEQ.
|
||||
func ObjetID(v uuid.UUID) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEQ(FieldObjetID, v))
|
||||
}
|
||||
|
||||
// NomFichier applies equality check predicate on the "nom_fichier" field. It's identical to NomFichierEQ.
|
||||
func NomFichier(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEQ(FieldNomFichier, v))
|
||||
}
|
||||
|
||||
// Chemin applies equality check predicate on the "chemin" field. It's identical to CheminEQ.
|
||||
func Chemin(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEQ(FieldChemin, v))
|
||||
}
|
||||
|
||||
// TypeMime applies equality check predicate on the "type_mime" field. It's identical to TypeMimeEQ.
|
||||
func TypeMime(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEQ(FieldTypeMime, v))
|
||||
}
|
||||
|
||||
// EstPrincipale applies equality check predicate on the "est_principale" field. It's identical to EstPrincipaleEQ.
|
||||
func EstPrincipale(v bool) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEQ(FieldEstPrincipale, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(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.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// ObjetIDEQ applies the EQ predicate on the "objet_id" field.
|
||||
func ObjetIDEQ(v uuid.UUID) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEQ(FieldObjetID, v))
|
||||
}
|
||||
|
||||
// ObjetIDNEQ applies the NEQ predicate on the "objet_id" field.
|
||||
func ObjetIDNEQ(v uuid.UUID) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNEQ(FieldObjetID, v))
|
||||
}
|
||||
|
||||
// ObjetIDIn applies the In predicate on the "objet_id" field.
|
||||
func ObjetIDIn(vs ...uuid.UUID) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldIn(FieldObjetID, vs...))
|
||||
}
|
||||
|
||||
// ObjetIDNotIn applies the NotIn predicate on the "objet_id" field.
|
||||
func ObjetIDNotIn(vs ...uuid.UUID) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNotIn(FieldObjetID, vs...))
|
||||
}
|
||||
|
||||
// NomFichierEQ applies the EQ predicate on the "nom_fichier" field.
|
||||
func NomFichierEQ(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEQ(FieldNomFichier, v))
|
||||
}
|
||||
|
||||
// NomFichierNEQ applies the NEQ predicate on the "nom_fichier" field.
|
||||
func NomFichierNEQ(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNEQ(FieldNomFichier, v))
|
||||
}
|
||||
|
||||
// NomFichierIn applies the In predicate on the "nom_fichier" field.
|
||||
func NomFichierIn(vs ...string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldIn(FieldNomFichier, vs...))
|
||||
}
|
||||
|
||||
// NomFichierNotIn applies the NotIn predicate on the "nom_fichier" field.
|
||||
func NomFichierNotIn(vs ...string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNotIn(FieldNomFichier, vs...))
|
||||
}
|
||||
|
||||
// NomFichierGT applies the GT predicate on the "nom_fichier" field.
|
||||
func NomFichierGT(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldGT(FieldNomFichier, v))
|
||||
}
|
||||
|
||||
// NomFichierGTE applies the GTE predicate on the "nom_fichier" field.
|
||||
func NomFichierGTE(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldGTE(FieldNomFichier, v))
|
||||
}
|
||||
|
||||
// NomFichierLT applies the LT predicate on the "nom_fichier" field.
|
||||
func NomFichierLT(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldLT(FieldNomFichier, v))
|
||||
}
|
||||
|
||||
// NomFichierLTE applies the LTE predicate on the "nom_fichier" field.
|
||||
func NomFichierLTE(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldLTE(FieldNomFichier, v))
|
||||
}
|
||||
|
||||
// NomFichierContains applies the Contains predicate on the "nom_fichier" field.
|
||||
func NomFichierContains(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldContains(FieldNomFichier, v))
|
||||
}
|
||||
|
||||
// NomFichierHasPrefix applies the HasPrefix predicate on the "nom_fichier" field.
|
||||
func NomFichierHasPrefix(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldHasPrefix(FieldNomFichier, v))
|
||||
}
|
||||
|
||||
// NomFichierHasSuffix applies the HasSuffix predicate on the "nom_fichier" field.
|
||||
func NomFichierHasSuffix(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldHasSuffix(FieldNomFichier, v))
|
||||
}
|
||||
|
||||
// NomFichierEqualFold applies the EqualFold predicate on the "nom_fichier" field.
|
||||
func NomFichierEqualFold(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEqualFold(FieldNomFichier, v))
|
||||
}
|
||||
|
||||
// NomFichierContainsFold applies the ContainsFold predicate on the "nom_fichier" field.
|
||||
func NomFichierContainsFold(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldContainsFold(FieldNomFichier, v))
|
||||
}
|
||||
|
||||
// CheminEQ applies the EQ predicate on the "chemin" field.
|
||||
func CheminEQ(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEQ(FieldChemin, v))
|
||||
}
|
||||
|
||||
// CheminNEQ applies the NEQ predicate on the "chemin" field.
|
||||
func CheminNEQ(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNEQ(FieldChemin, v))
|
||||
}
|
||||
|
||||
// CheminIn applies the In predicate on the "chemin" field.
|
||||
func CheminIn(vs ...string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldIn(FieldChemin, vs...))
|
||||
}
|
||||
|
||||
// CheminNotIn applies the NotIn predicate on the "chemin" field.
|
||||
func CheminNotIn(vs ...string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNotIn(FieldChemin, vs...))
|
||||
}
|
||||
|
||||
// CheminGT applies the GT predicate on the "chemin" field.
|
||||
func CheminGT(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldGT(FieldChemin, v))
|
||||
}
|
||||
|
||||
// CheminGTE applies the GTE predicate on the "chemin" field.
|
||||
func CheminGTE(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldGTE(FieldChemin, v))
|
||||
}
|
||||
|
||||
// CheminLT applies the LT predicate on the "chemin" field.
|
||||
func CheminLT(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldLT(FieldChemin, v))
|
||||
}
|
||||
|
||||
// CheminLTE applies the LTE predicate on the "chemin" field.
|
||||
func CheminLTE(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldLTE(FieldChemin, v))
|
||||
}
|
||||
|
||||
// CheminContains applies the Contains predicate on the "chemin" field.
|
||||
func CheminContains(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldContains(FieldChemin, v))
|
||||
}
|
||||
|
||||
// CheminHasPrefix applies the HasPrefix predicate on the "chemin" field.
|
||||
func CheminHasPrefix(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldHasPrefix(FieldChemin, v))
|
||||
}
|
||||
|
||||
// CheminHasSuffix applies the HasSuffix predicate on the "chemin" field.
|
||||
func CheminHasSuffix(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldHasSuffix(FieldChemin, v))
|
||||
}
|
||||
|
||||
// CheminEqualFold applies the EqualFold predicate on the "chemin" field.
|
||||
func CheminEqualFold(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEqualFold(FieldChemin, v))
|
||||
}
|
||||
|
||||
// CheminContainsFold applies the ContainsFold predicate on the "chemin" field.
|
||||
func CheminContainsFold(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldContainsFold(FieldChemin, v))
|
||||
}
|
||||
|
||||
// TypeMimeEQ applies the EQ predicate on the "type_mime" field.
|
||||
func TypeMimeEQ(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEQ(FieldTypeMime, v))
|
||||
}
|
||||
|
||||
// TypeMimeNEQ applies the NEQ predicate on the "type_mime" field.
|
||||
func TypeMimeNEQ(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNEQ(FieldTypeMime, v))
|
||||
}
|
||||
|
||||
// TypeMimeIn applies the In predicate on the "type_mime" field.
|
||||
func TypeMimeIn(vs ...string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldIn(FieldTypeMime, vs...))
|
||||
}
|
||||
|
||||
// TypeMimeNotIn applies the NotIn predicate on the "type_mime" field.
|
||||
func TypeMimeNotIn(vs ...string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNotIn(FieldTypeMime, vs...))
|
||||
}
|
||||
|
||||
// TypeMimeGT applies the GT predicate on the "type_mime" field.
|
||||
func TypeMimeGT(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldGT(FieldTypeMime, v))
|
||||
}
|
||||
|
||||
// TypeMimeGTE applies the GTE predicate on the "type_mime" field.
|
||||
func TypeMimeGTE(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldGTE(FieldTypeMime, v))
|
||||
}
|
||||
|
||||
// TypeMimeLT applies the LT predicate on the "type_mime" field.
|
||||
func TypeMimeLT(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldLT(FieldTypeMime, v))
|
||||
}
|
||||
|
||||
// TypeMimeLTE applies the LTE predicate on the "type_mime" field.
|
||||
func TypeMimeLTE(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldLTE(FieldTypeMime, v))
|
||||
}
|
||||
|
||||
// TypeMimeContains applies the Contains predicate on the "type_mime" field.
|
||||
func TypeMimeContains(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldContains(FieldTypeMime, v))
|
||||
}
|
||||
|
||||
// TypeMimeHasPrefix applies the HasPrefix predicate on the "type_mime" field.
|
||||
func TypeMimeHasPrefix(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldHasPrefix(FieldTypeMime, v))
|
||||
}
|
||||
|
||||
// TypeMimeHasSuffix applies the HasSuffix predicate on the "type_mime" field.
|
||||
func TypeMimeHasSuffix(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldHasSuffix(FieldTypeMime, v))
|
||||
}
|
||||
|
||||
// TypeMimeEqualFold applies the EqualFold predicate on the "type_mime" field.
|
||||
func TypeMimeEqualFold(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEqualFold(FieldTypeMime, v))
|
||||
}
|
||||
|
||||
// TypeMimeContainsFold applies the ContainsFold predicate on the "type_mime" field.
|
||||
func TypeMimeContainsFold(v string) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldContainsFold(FieldTypeMime, v))
|
||||
}
|
||||
|
||||
// EstPrincipaleEQ applies the EQ predicate on the "est_principale" field.
|
||||
func EstPrincipaleEQ(v bool) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEQ(FieldEstPrincipale, v))
|
||||
}
|
||||
|
||||
// EstPrincipaleNEQ applies the NEQ predicate on the "est_principale" field.
|
||||
func EstPrincipaleNEQ(v bool) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNEQ(FieldEstPrincipale, v))
|
||||
}
|
||||
|
||||
// CategorieEQ applies the EQ predicate on the "categorie" field.
|
||||
func CategorieEQ(v Categorie) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEQ(FieldCategorie, v))
|
||||
}
|
||||
|
||||
// CategorieNEQ applies the NEQ predicate on the "categorie" field.
|
||||
func CategorieNEQ(v Categorie) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNEQ(FieldCategorie, v))
|
||||
}
|
||||
|
||||
// CategorieIn applies the In predicate on the "categorie" field.
|
||||
func CategorieIn(vs ...Categorie) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldIn(FieldCategorie, vs...))
|
||||
}
|
||||
|
||||
// CategorieNotIn applies the NotIn predicate on the "categorie" field.
|
||||
func CategorieNotIn(vs ...Categorie) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNotIn(FieldCategorie, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||||
func CreatedAtGT(v time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||||
func CreatedAtLT(v time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||||
func UpdatedAtNEQ(v time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||||
func UpdatedAtIn(vs ...time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||||
func UpdatedAtNotIn(vs ...time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||||
func UpdatedAtGT(v time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||||
func UpdatedAtGTE(v time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||||
func UpdatedAtLT(v time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||||
func UpdatedAtLTE(v time.Time) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// HasObjet applies the HasEdge predicate on the "objet" edge.
|
||||
func HasObjet() predicate.PieceJointe {
|
||||
return predicate.PieceJointe(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, ObjetTable, ObjetColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasObjetWith applies the HasEdge predicate on the "objet" edge with a given conditions (other predicates).
|
||||
func HasObjetWith(preds ...predicate.Objet) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(func(s *sql.Selector) {
|
||||
step := newObjetStep()
|
||||
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.PieceJointe) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.PieceJointe) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.PieceJointe) predicate.PieceJointe {
|
||||
return predicate.PieceJointe(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user