[feature] migrate to monorepo
This commit is contained in:
commit
05ddc1f783
267 changed files with 75165 additions and 0 deletions
159
backend/ent/media/media.go
Normal file
159
backend/ent/media/media.go
Normal file
|
@ -0,0 +1,159 @@
|
|||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package media
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the media type in the database.
|
||||
Label = "media"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldStorageID holds the string denoting the storage_id field in the database.
|
||||
FieldStorageID = "storage_id"
|
||||
// FieldOriginalName holds the string denoting the original_name field in the database.
|
||||
FieldOriginalName = "original_name"
|
||||
// FieldMimeType holds the string denoting the mime_type field in the database.
|
||||
FieldMimeType = "mime_type"
|
||||
// FieldSize holds the string denoting the size field in the database.
|
||||
FieldSize = "size"
|
||||
// FieldURL holds the string denoting the url field in the database.
|
||||
FieldURL = "url"
|
||||
// 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"
|
||||
// FieldCreatedBy holds the string denoting the created_by field in the database.
|
||||
FieldCreatedBy = "created_by"
|
||||
// EdgeOwner holds the string denoting the owner edge name in mutations.
|
||||
EdgeOwner = "owner"
|
||||
// Table holds the table name of the media in the database.
|
||||
Table = "media"
|
||||
// OwnerTable is the table that holds the owner relation/edge.
|
||||
OwnerTable = "media"
|
||||
// OwnerInverseTable is the table name for the User entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "user" package.
|
||||
OwnerInverseTable = "users"
|
||||
// OwnerColumn is the table column denoting the owner relation/edge.
|
||||
OwnerColumn = "user_media"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for media fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldStorageID,
|
||||
FieldOriginalName,
|
||||
FieldMimeType,
|
||||
FieldSize,
|
||||
FieldURL,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
FieldCreatedBy,
|
||||
}
|
||||
|
||||
// ForeignKeys holds the SQL foreign-keys that are owned by the "media"
|
||||
// table and are not defined as standalone fields in the schema.
|
||||
var ForeignKeys = []string{
|
||||
"user_media",
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
}
|
||||
for i := range ForeignKeys {
|
||||
if column == ForeignKeys[i] {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var (
|
||||
// StorageIDValidator is a validator for the "storage_id" field. It is called by the builders before save.
|
||||
StorageIDValidator func(string) error
|
||||
// OriginalNameValidator is a validator for the "original_name" field. It is called by the builders before save.
|
||||
OriginalNameValidator func(string) error
|
||||
// MimeTypeValidator is a validator for the "mime_type" field. It is called by the builders before save.
|
||||
MimeTypeValidator func(string) error
|
||||
// SizeValidator is a validator for the "size" field. It is called by the builders before save.
|
||||
SizeValidator func(int64) error
|
||||
// URLValidator is a validator for the "url" field. It is called by the builders before save.
|
||||
URLValidator 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
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the Media 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()
|
||||
}
|
||||
|
||||
// ByStorageID orders the results by the storage_id field.
|
||||
func ByStorageID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStorageID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOriginalName orders the results by the original_name field.
|
||||
func ByOriginalName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOriginalName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMimeType orders the results by the mime_type field.
|
||||
func ByMimeType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMimeType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySize orders the results by the size field.
|
||||
func BySize(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSize, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByURL orders the results by the url field.
|
||||
func ByURL(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldURL, 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()
|
||||
}
|
||||
|
||||
// ByCreatedBy orders the results by the created_by field.
|
||||
func ByCreatedBy(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedBy, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOwnerField orders the results by owner field.
|
||||
func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newOwnerStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
func newOwnerStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(OwnerInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn),
|
||||
)
|
||||
}
|
589
backend/ent/media/where.go
Normal file
589
backend/ent/media/where.go
Normal file
|
@ -0,0 +1,589 @@
|
|||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package media
|
||||
|
||||
import (
|
||||
"time"
|
||||
"tss-rocks-be/ent/predicate"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// StorageID applies equality check predicate on the "storage_id" field. It's identical to StorageIDEQ.
|
||||
func StorageID(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// OriginalName applies equality check predicate on the "original_name" field. It's identical to OriginalNameEQ.
|
||||
func OriginalName(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldOriginalName, v))
|
||||
}
|
||||
|
||||
// MimeType applies equality check predicate on the "mime_type" field. It's identical to MimeTypeEQ.
|
||||
func MimeType(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// Size applies equality check predicate on the "size" field. It's identical to SizeEQ.
|
||||
func Size(v int64) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldSize, v))
|
||||
}
|
||||
|
||||
// URL applies equality check predicate on the "url" field. It's identical to URLEQ.
|
||||
func URL(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldURL, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.Media {
|
||||
return predicate.Media(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.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.
|
||||
func CreatedBy(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldCreatedBy, v))
|
||||
}
|
||||
|
||||
// StorageIDEQ applies the EQ predicate on the "storage_id" field.
|
||||
func StorageIDEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// StorageIDNEQ applies the NEQ predicate on the "storage_id" field.
|
||||
func StorageIDNEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// StorageIDIn applies the In predicate on the "storage_id" field.
|
||||
func StorageIDIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldStorageID, vs...))
|
||||
}
|
||||
|
||||
// StorageIDNotIn applies the NotIn predicate on the "storage_id" field.
|
||||
func StorageIDNotIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldStorageID, vs...))
|
||||
}
|
||||
|
||||
// StorageIDGT applies the GT predicate on the "storage_id" field.
|
||||
func StorageIDGT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// StorageIDGTE applies the GTE predicate on the "storage_id" field.
|
||||
func StorageIDGTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// StorageIDLT applies the LT predicate on the "storage_id" field.
|
||||
func StorageIDLT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// StorageIDLTE applies the LTE predicate on the "storage_id" field.
|
||||
func StorageIDLTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// StorageIDContains applies the Contains predicate on the "storage_id" field.
|
||||
func StorageIDContains(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContains(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// StorageIDHasPrefix applies the HasPrefix predicate on the "storage_id" field.
|
||||
func StorageIDHasPrefix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasPrefix(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// StorageIDHasSuffix applies the HasSuffix predicate on the "storage_id" field.
|
||||
func StorageIDHasSuffix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasSuffix(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// StorageIDEqualFold applies the EqualFold predicate on the "storage_id" field.
|
||||
func StorageIDEqualFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEqualFold(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// StorageIDContainsFold applies the ContainsFold predicate on the "storage_id" field.
|
||||
func StorageIDContainsFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContainsFold(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// OriginalNameEQ applies the EQ predicate on the "original_name" field.
|
||||
func OriginalNameEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldOriginalName, v))
|
||||
}
|
||||
|
||||
// OriginalNameNEQ applies the NEQ predicate on the "original_name" field.
|
||||
func OriginalNameNEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldOriginalName, v))
|
||||
}
|
||||
|
||||
// OriginalNameIn applies the In predicate on the "original_name" field.
|
||||
func OriginalNameIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldOriginalName, vs...))
|
||||
}
|
||||
|
||||
// OriginalNameNotIn applies the NotIn predicate on the "original_name" field.
|
||||
func OriginalNameNotIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldOriginalName, vs...))
|
||||
}
|
||||
|
||||
// OriginalNameGT applies the GT predicate on the "original_name" field.
|
||||
func OriginalNameGT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldOriginalName, v))
|
||||
}
|
||||
|
||||
// OriginalNameGTE applies the GTE predicate on the "original_name" field.
|
||||
func OriginalNameGTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldOriginalName, v))
|
||||
}
|
||||
|
||||
// OriginalNameLT applies the LT predicate on the "original_name" field.
|
||||
func OriginalNameLT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldOriginalName, v))
|
||||
}
|
||||
|
||||
// OriginalNameLTE applies the LTE predicate on the "original_name" field.
|
||||
func OriginalNameLTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldOriginalName, v))
|
||||
}
|
||||
|
||||
// OriginalNameContains applies the Contains predicate on the "original_name" field.
|
||||
func OriginalNameContains(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContains(FieldOriginalName, v))
|
||||
}
|
||||
|
||||
// OriginalNameHasPrefix applies the HasPrefix predicate on the "original_name" field.
|
||||
func OriginalNameHasPrefix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasPrefix(FieldOriginalName, v))
|
||||
}
|
||||
|
||||
// OriginalNameHasSuffix applies the HasSuffix predicate on the "original_name" field.
|
||||
func OriginalNameHasSuffix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasSuffix(FieldOriginalName, v))
|
||||
}
|
||||
|
||||
// OriginalNameEqualFold applies the EqualFold predicate on the "original_name" field.
|
||||
func OriginalNameEqualFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEqualFold(FieldOriginalName, v))
|
||||
}
|
||||
|
||||
// OriginalNameContainsFold applies the ContainsFold predicate on the "original_name" field.
|
||||
func OriginalNameContainsFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContainsFold(FieldOriginalName, v))
|
||||
}
|
||||
|
||||
// MimeTypeEQ applies the EQ predicate on the "mime_type" field.
|
||||
func MimeTypeEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeNEQ applies the NEQ predicate on the "mime_type" field.
|
||||
func MimeTypeNEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeIn applies the In predicate on the "mime_type" field.
|
||||
func MimeTypeIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldMimeType, vs...))
|
||||
}
|
||||
|
||||
// MimeTypeNotIn applies the NotIn predicate on the "mime_type" field.
|
||||
func MimeTypeNotIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldMimeType, vs...))
|
||||
}
|
||||
|
||||
// MimeTypeGT applies the GT predicate on the "mime_type" field.
|
||||
func MimeTypeGT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeGTE applies the GTE predicate on the "mime_type" field.
|
||||
func MimeTypeGTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeLT applies the LT predicate on the "mime_type" field.
|
||||
func MimeTypeLT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeLTE applies the LTE predicate on the "mime_type" field.
|
||||
func MimeTypeLTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeContains applies the Contains predicate on the "mime_type" field.
|
||||
func MimeTypeContains(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContains(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeHasPrefix applies the HasPrefix predicate on the "mime_type" field.
|
||||
func MimeTypeHasPrefix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasPrefix(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeHasSuffix applies the HasSuffix predicate on the "mime_type" field.
|
||||
func MimeTypeHasSuffix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasSuffix(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeEqualFold applies the EqualFold predicate on the "mime_type" field.
|
||||
func MimeTypeEqualFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEqualFold(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// MimeTypeContainsFold applies the ContainsFold predicate on the "mime_type" field.
|
||||
func MimeTypeContainsFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContainsFold(FieldMimeType, v))
|
||||
}
|
||||
|
||||
// SizeEQ applies the EQ predicate on the "size" field.
|
||||
func SizeEQ(v int64) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldSize, v))
|
||||
}
|
||||
|
||||
// SizeNEQ applies the NEQ predicate on the "size" field.
|
||||
func SizeNEQ(v int64) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldSize, v))
|
||||
}
|
||||
|
||||
// SizeIn applies the In predicate on the "size" field.
|
||||
func SizeIn(vs ...int64) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldSize, vs...))
|
||||
}
|
||||
|
||||
// SizeNotIn applies the NotIn predicate on the "size" field.
|
||||
func SizeNotIn(vs ...int64) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldSize, vs...))
|
||||
}
|
||||
|
||||
// SizeGT applies the GT predicate on the "size" field.
|
||||
func SizeGT(v int64) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldSize, v))
|
||||
}
|
||||
|
||||
// SizeGTE applies the GTE predicate on the "size" field.
|
||||
func SizeGTE(v int64) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldSize, v))
|
||||
}
|
||||
|
||||
// SizeLT applies the LT predicate on the "size" field.
|
||||
func SizeLT(v int64) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldSize, v))
|
||||
}
|
||||
|
||||
// SizeLTE applies the LTE predicate on the "size" field.
|
||||
func SizeLTE(v int64) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldSize, v))
|
||||
}
|
||||
|
||||
// URLEQ applies the EQ predicate on the "url" field.
|
||||
func URLEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLNEQ applies the NEQ predicate on the "url" field.
|
||||
func URLNEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLIn applies the In predicate on the "url" field.
|
||||
func URLIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldURL, vs...))
|
||||
}
|
||||
|
||||
// URLNotIn applies the NotIn predicate on the "url" field.
|
||||
func URLNotIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldURL, vs...))
|
||||
}
|
||||
|
||||
// URLGT applies the GT predicate on the "url" field.
|
||||
func URLGT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLGTE applies the GTE predicate on the "url" field.
|
||||
func URLGTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLLT applies the LT predicate on the "url" field.
|
||||
func URLLT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLLTE applies the LTE predicate on the "url" field.
|
||||
func URLLTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLContains applies the Contains predicate on the "url" field.
|
||||
func URLContains(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContains(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLHasPrefix applies the HasPrefix predicate on the "url" field.
|
||||
func URLHasPrefix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasPrefix(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLHasSuffix applies the HasSuffix predicate on the "url" field.
|
||||
func URLHasSuffix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasSuffix(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLEqualFold applies the EqualFold predicate on the "url" field.
|
||||
func URLEqualFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEqualFold(FieldURL, v))
|
||||
}
|
||||
|
||||
// URLContainsFold applies the ContainsFold predicate on the "url" field.
|
||||
func URLContainsFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContainsFold(FieldURL, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||||
func CreatedAtGT(v time.Time) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||||
func CreatedAtLT(v time.Time) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v time.Time) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||||
func UpdatedAtNEQ(v time.Time) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||||
func UpdatedAtIn(vs ...time.Time) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||||
func UpdatedAtNotIn(vs ...time.Time) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||||
func UpdatedAtGT(v time.Time) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||||
func UpdatedAtGTE(v time.Time) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||||
func UpdatedAtLT(v time.Time) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||||
func UpdatedAtLTE(v time.Time) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedByEQ applies the EQ predicate on the "created_by" field.
|
||||
func CreatedByEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldCreatedBy, v))
|
||||
}
|
||||
|
||||
// CreatedByNEQ applies the NEQ predicate on the "created_by" field.
|
||||
func CreatedByNEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldCreatedBy, v))
|
||||
}
|
||||
|
||||
// CreatedByIn applies the In predicate on the "created_by" field.
|
||||
func CreatedByIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldCreatedBy, vs...))
|
||||
}
|
||||
|
||||
// CreatedByNotIn applies the NotIn predicate on the "created_by" field.
|
||||
func CreatedByNotIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldCreatedBy, vs...))
|
||||
}
|
||||
|
||||
// CreatedByGT applies the GT predicate on the "created_by" field.
|
||||
func CreatedByGT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldCreatedBy, v))
|
||||
}
|
||||
|
||||
// CreatedByGTE applies the GTE predicate on the "created_by" field.
|
||||
func CreatedByGTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldCreatedBy, v))
|
||||
}
|
||||
|
||||
// CreatedByLT applies the LT predicate on the "created_by" field.
|
||||
func CreatedByLT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldCreatedBy, v))
|
||||
}
|
||||
|
||||
// CreatedByLTE applies the LTE predicate on the "created_by" field.
|
||||
func CreatedByLTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldCreatedBy, v))
|
||||
}
|
||||
|
||||
// CreatedByContains applies the Contains predicate on the "created_by" field.
|
||||
func CreatedByContains(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContains(FieldCreatedBy, v))
|
||||
}
|
||||
|
||||
// CreatedByHasPrefix applies the HasPrefix predicate on the "created_by" field.
|
||||
func CreatedByHasPrefix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasPrefix(FieldCreatedBy, v))
|
||||
}
|
||||
|
||||
// CreatedByHasSuffix applies the HasSuffix predicate on the "created_by" field.
|
||||
func CreatedByHasSuffix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasSuffix(FieldCreatedBy, v))
|
||||
}
|
||||
|
||||
// CreatedByIsNil applies the IsNil predicate on the "created_by" field.
|
||||
func CreatedByIsNil() predicate.Media {
|
||||
return predicate.Media(sql.FieldIsNull(FieldCreatedBy))
|
||||
}
|
||||
|
||||
// CreatedByNotNil applies the NotNil predicate on the "created_by" field.
|
||||
func CreatedByNotNil() predicate.Media {
|
||||
return predicate.Media(sql.FieldNotNull(FieldCreatedBy))
|
||||
}
|
||||
|
||||
// CreatedByEqualFold applies the EqualFold predicate on the "created_by" field.
|
||||
func CreatedByEqualFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEqualFold(FieldCreatedBy, v))
|
||||
}
|
||||
|
||||
// CreatedByContainsFold applies the ContainsFold predicate on the "created_by" field.
|
||||
func CreatedByContainsFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContainsFold(FieldCreatedBy, v))
|
||||
}
|
||||
|
||||
// HasOwner applies the HasEdge predicate on the "owner" edge.
|
||||
func HasOwner() predicate.Media {
|
||||
return predicate.Media(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasOwnerWith applies the HasEdge predicate on the "owner" edge with a given conditions (other predicates).
|
||||
func HasOwnerWith(preds ...predicate.User) predicate.Media {
|
||||
return predicate.Media(func(s *sql.Selector) {
|
||||
step := newOwnerStep()
|
||||
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.Media) predicate.Media {
|
||||
return predicate.Media(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.Media) predicate.Media {
|
||||
return predicate.Media(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.Media) predicate.Media {
|
||||
return predicate.Media(sql.NotPredicates(p))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue