mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-09 19:47:47 +08:00
feat: add movie tracking feature
This commit is contained in:
201
ent/media/media.go
Normal file
201
ent/media/media.go
Normal file
@@ -0,0 +1,201 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package media
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"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"
|
||||
// FieldTmdbID holds the string denoting the tmdb_id field in the database.
|
||||
FieldTmdbID = "tmdb_id"
|
||||
// FieldImdbID holds the string denoting the imdb_id field in the database.
|
||||
FieldImdbID = "imdb_id"
|
||||
// FieldMediaType holds the string denoting the media_type field in the database.
|
||||
FieldMediaType = "media_type"
|
||||
// FieldNameCn holds the string denoting the name_cn field in the database.
|
||||
FieldNameCn = "name_cn"
|
||||
// FieldNameEn holds the string denoting the name_en field in the database.
|
||||
FieldNameEn = "name_en"
|
||||
// FieldOriginalName holds the string denoting the original_name field in the database.
|
||||
FieldOriginalName = "original_name"
|
||||
// FieldOverview holds the string denoting the overview field in the database.
|
||||
FieldOverview = "overview"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// FieldAirDate holds the string denoting the air_date field in the database.
|
||||
FieldAirDate = "air_date"
|
||||
// FieldResolution holds the string denoting the resolution field in the database.
|
||||
FieldResolution = "resolution"
|
||||
// FieldStorageID holds the string denoting the storage_id field in the database.
|
||||
FieldStorageID = "storage_id"
|
||||
// FieldTargetDir holds the string denoting the target_dir field in the database.
|
||||
FieldTargetDir = "target_dir"
|
||||
// EdgeEpisodes holds the string denoting the episodes edge name in mutations.
|
||||
EdgeEpisodes = "episodes"
|
||||
// Table holds the table name of the media in the database.
|
||||
Table = "media"
|
||||
// EpisodesTable is the table that holds the episodes relation/edge.
|
||||
EpisodesTable = "episodes"
|
||||
// EpisodesInverseTable is the table name for the Episode entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "episode" package.
|
||||
EpisodesInverseTable = "episodes"
|
||||
// EpisodesColumn is the table column denoting the episodes relation/edge.
|
||||
EpisodesColumn = "media_id"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for media fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldTmdbID,
|
||||
FieldImdbID,
|
||||
FieldMediaType,
|
||||
FieldNameCn,
|
||||
FieldNameEn,
|
||||
FieldOriginalName,
|
||||
FieldOverview,
|
||||
FieldCreatedAt,
|
||||
FieldAirDate,
|
||||
FieldResolution,
|
||||
FieldStorageID,
|
||||
FieldTargetDir,
|
||||
}
|
||||
|
||||
// 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 (
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt time.Time
|
||||
// DefaultAirDate holds the default value on creation for the "air_date" field.
|
||||
DefaultAirDate string
|
||||
// DefaultResolution holds the default value on creation for the "resolution" field.
|
||||
DefaultResolution string
|
||||
)
|
||||
|
||||
// MediaType defines the type for the "media_type" enum field.
|
||||
type MediaType string
|
||||
|
||||
// MediaType values.
|
||||
const (
|
||||
MediaTypeTv MediaType = "tv"
|
||||
MediaTypeMovie MediaType = "movie"
|
||||
)
|
||||
|
||||
func (mt MediaType) String() string {
|
||||
return string(mt)
|
||||
}
|
||||
|
||||
// MediaTypeValidator is a validator for the "media_type" field enum values. It is called by the builders before save.
|
||||
func MediaTypeValidator(mt MediaType) error {
|
||||
switch mt {
|
||||
case MediaTypeTv, MediaTypeMovie:
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("media: invalid enum value for media_type field: %q", mt)
|
||||
}
|
||||
}
|
||||
|
||||
// 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()
|
||||
}
|
||||
|
||||
// ByTmdbID orders the results by the tmdb_id field.
|
||||
func ByTmdbID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTmdbID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByImdbID orders the results by the imdb_id field.
|
||||
func ByImdbID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldImdbID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMediaType orders the results by the media_type field.
|
||||
func ByMediaType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMediaType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByNameCn orders the results by the name_cn field.
|
||||
func ByNameCn(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldNameCn, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByNameEn orders the results by the name_en field.
|
||||
func ByNameEn(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldNameEn, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOriginalName orders the results by the original_name field.
|
||||
func ByOriginalName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOriginalName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOverview orders the results by the overview field.
|
||||
func ByOverview(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOverview, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAirDate orders the results by the air_date field.
|
||||
func ByAirDate(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAirDate, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByResolution orders the results by the resolution field.
|
||||
func ByResolution(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldResolution, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStorageID orders the results by the storage_id field.
|
||||
func ByStorageID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStorageID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTargetDir orders the results by the target_dir field.
|
||||
func ByTargetDir(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTargetDir, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByEpisodesCount orders the results by episodes count.
|
||||
func ByEpisodesCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newEpisodesStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByEpisodes orders the results by episodes terms.
|
||||
func ByEpisodes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newEpisodesStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
func newEpisodesStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(EpisodesInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, EpisodesTable, EpisodesColumn),
|
||||
)
|
||||
}
|
||||
839
ent/media/where.go
Normal file
839
ent/media/where.go
Normal file
@@ -0,0 +1,839 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package media
|
||||
|
||||
import (
|
||||
"polaris/ent/predicate"
|
||||
"time"
|
||||
|
||||
"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))
|
||||
}
|
||||
|
||||
// TmdbID applies equality check predicate on the "tmdb_id" field. It's identical to TmdbIDEQ.
|
||||
func TmdbID(v int) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldTmdbID, v))
|
||||
}
|
||||
|
||||
// ImdbID applies equality check predicate on the "imdb_id" field. It's identical to ImdbIDEQ.
|
||||
func ImdbID(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldImdbID, v))
|
||||
}
|
||||
|
||||
// NameCn applies equality check predicate on the "name_cn" field. It's identical to NameCnEQ.
|
||||
func NameCn(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldNameCn, v))
|
||||
}
|
||||
|
||||
// NameEn applies equality check predicate on the "name_en" field. It's identical to NameEnEQ.
|
||||
func NameEn(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldNameEn, 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))
|
||||
}
|
||||
|
||||
// Overview applies equality check predicate on the "overview" field. It's identical to OverviewEQ.
|
||||
func Overview(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldOverview, 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))
|
||||
}
|
||||
|
||||
// AirDate applies equality check predicate on the "air_date" field. It's identical to AirDateEQ.
|
||||
func AirDate(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldAirDate, v))
|
||||
}
|
||||
|
||||
// Resolution applies equality check predicate on the "resolution" field. It's identical to ResolutionEQ.
|
||||
func Resolution(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldResolution, v))
|
||||
}
|
||||
|
||||
// StorageID applies equality check predicate on the "storage_id" field. It's identical to StorageIDEQ.
|
||||
func StorageID(v int) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// TargetDir applies equality check predicate on the "target_dir" field. It's identical to TargetDirEQ.
|
||||
func TargetDir(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldTargetDir, v))
|
||||
}
|
||||
|
||||
// TmdbIDEQ applies the EQ predicate on the "tmdb_id" field.
|
||||
func TmdbIDEQ(v int) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldTmdbID, v))
|
||||
}
|
||||
|
||||
// TmdbIDNEQ applies the NEQ predicate on the "tmdb_id" field.
|
||||
func TmdbIDNEQ(v int) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldTmdbID, v))
|
||||
}
|
||||
|
||||
// TmdbIDIn applies the In predicate on the "tmdb_id" field.
|
||||
func TmdbIDIn(vs ...int) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldTmdbID, vs...))
|
||||
}
|
||||
|
||||
// TmdbIDNotIn applies the NotIn predicate on the "tmdb_id" field.
|
||||
func TmdbIDNotIn(vs ...int) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldTmdbID, vs...))
|
||||
}
|
||||
|
||||
// TmdbIDGT applies the GT predicate on the "tmdb_id" field.
|
||||
func TmdbIDGT(v int) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldTmdbID, v))
|
||||
}
|
||||
|
||||
// TmdbIDGTE applies the GTE predicate on the "tmdb_id" field.
|
||||
func TmdbIDGTE(v int) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldTmdbID, v))
|
||||
}
|
||||
|
||||
// TmdbIDLT applies the LT predicate on the "tmdb_id" field.
|
||||
func TmdbIDLT(v int) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldTmdbID, v))
|
||||
}
|
||||
|
||||
// TmdbIDLTE applies the LTE predicate on the "tmdb_id" field.
|
||||
func TmdbIDLTE(v int) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldTmdbID, v))
|
||||
}
|
||||
|
||||
// ImdbIDEQ applies the EQ predicate on the "imdb_id" field.
|
||||
func ImdbIDEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldImdbID, v))
|
||||
}
|
||||
|
||||
// ImdbIDNEQ applies the NEQ predicate on the "imdb_id" field.
|
||||
func ImdbIDNEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldImdbID, v))
|
||||
}
|
||||
|
||||
// ImdbIDIn applies the In predicate on the "imdb_id" field.
|
||||
func ImdbIDIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldImdbID, vs...))
|
||||
}
|
||||
|
||||
// ImdbIDNotIn applies the NotIn predicate on the "imdb_id" field.
|
||||
func ImdbIDNotIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldImdbID, vs...))
|
||||
}
|
||||
|
||||
// ImdbIDGT applies the GT predicate on the "imdb_id" field.
|
||||
func ImdbIDGT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldImdbID, v))
|
||||
}
|
||||
|
||||
// ImdbIDGTE applies the GTE predicate on the "imdb_id" field.
|
||||
func ImdbIDGTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldImdbID, v))
|
||||
}
|
||||
|
||||
// ImdbIDLT applies the LT predicate on the "imdb_id" field.
|
||||
func ImdbIDLT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldImdbID, v))
|
||||
}
|
||||
|
||||
// ImdbIDLTE applies the LTE predicate on the "imdb_id" field.
|
||||
func ImdbIDLTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldImdbID, v))
|
||||
}
|
||||
|
||||
// ImdbIDContains applies the Contains predicate on the "imdb_id" field.
|
||||
func ImdbIDContains(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContains(FieldImdbID, v))
|
||||
}
|
||||
|
||||
// ImdbIDHasPrefix applies the HasPrefix predicate on the "imdb_id" field.
|
||||
func ImdbIDHasPrefix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasPrefix(FieldImdbID, v))
|
||||
}
|
||||
|
||||
// ImdbIDHasSuffix applies the HasSuffix predicate on the "imdb_id" field.
|
||||
func ImdbIDHasSuffix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasSuffix(FieldImdbID, v))
|
||||
}
|
||||
|
||||
// ImdbIDIsNil applies the IsNil predicate on the "imdb_id" field.
|
||||
func ImdbIDIsNil() predicate.Media {
|
||||
return predicate.Media(sql.FieldIsNull(FieldImdbID))
|
||||
}
|
||||
|
||||
// ImdbIDNotNil applies the NotNil predicate on the "imdb_id" field.
|
||||
func ImdbIDNotNil() predicate.Media {
|
||||
return predicate.Media(sql.FieldNotNull(FieldImdbID))
|
||||
}
|
||||
|
||||
// ImdbIDEqualFold applies the EqualFold predicate on the "imdb_id" field.
|
||||
func ImdbIDEqualFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEqualFold(FieldImdbID, v))
|
||||
}
|
||||
|
||||
// ImdbIDContainsFold applies the ContainsFold predicate on the "imdb_id" field.
|
||||
func ImdbIDContainsFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContainsFold(FieldImdbID, v))
|
||||
}
|
||||
|
||||
// MediaTypeEQ applies the EQ predicate on the "media_type" field.
|
||||
func MediaTypeEQ(v MediaType) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldMediaType, v))
|
||||
}
|
||||
|
||||
// MediaTypeNEQ applies the NEQ predicate on the "media_type" field.
|
||||
func MediaTypeNEQ(v MediaType) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldMediaType, v))
|
||||
}
|
||||
|
||||
// MediaTypeIn applies the In predicate on the "media_type" field.
|
||||
func MediaTypeIn(vs ...MediaType) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldMediaType, vs...))
|
||||
}
|
||||
|
||||
// MediaTypeNotIn applies the NotIn predicate on the "media_type" field.
|
||||
func MediaTypeNotIn(vs ...MediaType) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldMediaType, vs...))
|
||||
}
|
||||
|
||||
// NameCnEQ applies the EQ predicate on the "name_cn" field.
|
||||
func NameCnEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldNameCn, v))
|
||||
}
|
||||
|
||||
// NameCnNEQ applies the NEQ predicate on the "name_cn" field.
|
||||
func NameCnNEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldNameCn, v))
|
||||
}
|
||||
|
||||
// NameCnIn applies the In predicate on the "name_cn" field.
|
||||
func NameCnIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldNameCn, vs...))
|
||||
}
|
||||
|
||||
// NameCnNotIn applies the NotIn predicate on the "name_cn" field.
|
||||
func NameCnNotIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldNameCn, vs...))
|
||||
}
|
||||
|
||||
// NameCnGT applies the GT predicate on the "name_cn" field.
|
||||
func NameCnGT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldNameCn, v))
|
||||
}
|
||||
|
||||
// NameCnGTE applies the GTE predicate on the "name_cn" field.
|
||||
func NameCnGTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldNameCn, v))
|
||||
}
|
||||
|
||||
// NameCnLT applies the LT predicate on the "name_cn" field.
|
||||
func NameCnLT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldNameCn, v))
|
||||
}
|
||||
|
||||
// NameCnLTE applies the LTE predicate on the "name_cn" field.
|
||||
func NameCnLTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldNameCn, v))
|
||||
}
|
||||
|
||||
// NameCnContains applies the Contains predicate on the "name_cn" field.
|
||||
func NameCnContains(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContains(FieldNameCn, v))
|
||||
}
|
||||
|
||||
// NameCnHasPrefix applies the HasPrefix predicate on the "name_cn" field.
|
||||
func NameCnHasPrefix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasPrefix(FieldNameCn, v))
|
||||
}
|
||||
|
||||
// NameCnHasSuffix applies the HasSuffix predicate on the "name_cn" field.
|
||||
func NameCnHasSuffix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasSuffix(FieldNameCn, v))
|
||||
}
|
||||
|
||||
// NameCnEqualFold applies the EqualFold predicate on the "name_cn" field.
|
||||
func NameCnEqualFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEqualFold(FieldNameCn, v))
|
||||
}
|
||||
|
||||
// NameCnContainsFold applies the ContainsFold predicate on the "name_cn" field.
|
||||
func NameCnContainsFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContainsFold(FieldNameCn, v))
|
||||
}
|
||||
|
||||
// NameEnEQ applies the EQ predicate on the "name_en" field.
|
||||
func NameEnEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldNameEn, v))
|
||||
}
|
||||
|
||||
// NameEnNEQ applies the NEQ predicate on the "name_en" field.
|
||||
func NameEnNEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldNameEn, v))
|
||||
}
|
||||
|
||||
// NameEnIn applies the In predicate on the "name_en" field.
|
||||
func NameEnIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldNameEn, vs...))
|
||||
}
|
||||
|
||||
// NameEnNotIn applies the NotIn predicate on the "name_en" field.
|
||||
func NameEnNotIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldNameEn, vs...))
|
||||
}
|
||||
|
||||
// NameEnGT applies the GT predicate on the "name_en" field.
|
||||
func NameEnGT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldNameEn, v))
|
||||
}
|
||||
|
||||
// NameEnGTE applies the GTE predicate on the "name_en" field.
|
||||
func NameEnGTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldNameEn, v))
|
||||
}
|
||||
|
||||
// NameEnLT applies the LT predicate on the "name_en" field.
|
||||
func NameEnLT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldNameEn, v))
|
||||
}
|
||||
|
||||
// NameEnLTE applies the LTE predicate on the "name_en" field.
|
||||
func NameEnLTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldNameEn, v))
|
||||
}
|
||||
|
||||
// NameEnContains applies the Contains predicate on the "name_en" field.
|
||||
func NameEnContains(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContains(FieldNameEn, v))
|
||||
}
|
||||
|
||||
// NameEnHasPrefix applies the HasPrefix predicate on the "name_en" field.
|
||||
func NameEnHasPrefix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasPrefix(FieldNameEn, v))
|
||||
}
|
||||
|
||||
// NameEnHasSuffix applies the HasSuffix predicate on the "name_en" field.
|
||||
func NameEnHasSuffix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasSuffix(FieldNameEn, v))
|
||||
}
|
||||
|
||||
// NameEnEqualFold applies the EqualFold predicate on the "name_en" field.
|
||||
func NameEnEqualFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEqualFold(FieldNameEn, v))
|
||||
}
|
||||
|
||||
// NameEnContainsFold applies the ContainsFold predicate on the "name_en" field.
|
||||
func NameEnContainsFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContainsFold(FieldNameEn, 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))
|
||||
}
|
||||
|
||||
// OverviewEQ applies the EQ predicate on the "overview" field.
|
||||
func OverviewEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldOverview, v))
|
||||
}
|
||||
|
||||
// OverviewNEQ applies the NEQ predicate on the "overview" field.
|
||||
func OverviewNEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldOverview, v))
|
||||
}
|
||||
|
||||
// OverviewIn applies the In predicate on the "overview" field.
|
||||
func OverviewIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldOverview, vs...))
|
||||
}
|
||||
|
||||
// OverviewNotIn applies the NotIn predicate on the "overview" field.
|
||||
func OverviewNotIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldOverview, vs...))
|
||||
}
|
||||
|
||||
// OverviewGT applies the GT predicate on the "overview" field.
|
||||
func OverviewGT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldOverview, v))
|
||||
}
|
||||
|
||||
// OverviewGTE applies the GTE predicate on the "overview" field.
|
||||
func OverviewGTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldOverview, v))
|
||||
}
|
||||
|
||||
// OverviewLT applies the LT predicate on the "overview" field.
|
||||
func OverviewLT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldOverview, v))
|
||||
}
|
||||
|
||||
// OverviewLTE applies the LTE predicate on the "overview" field.
|
||||
func OverviewLTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldOverview, v))
|
||||
}
|
||||
|
||||
// OverviewContains applies the Contains predicate on the "overview" field.
|
||||
func OverviewContains(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContains(FieldOverview, v))
|
||||
}
|
||||
|
||||
// OverviewHasPrefix applies the HasPrefix predicate on the "overview" field.
|
||||
func OverviewHasPrefix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasPrefix(FieldOverview, v))
|
||||
}
|
||||
|
||||
// OverviewHasSuffix applies the HasSuffix predicate on the "overview" field.
|
||||
func OverviewHasSuffix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasSuffix(FieldOverview, v))
|
||||
}
|
||||
|
||||
// OverviewEqualFold applies the EqualFold predicate on the "overview" field.
|
||||
func OverviewEqualFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEqualFold(FieldOverview, v))
|
||||
}
|
||||
|
||||
// OverviewContainsFold applies the ContainsFold predicate on the "overview" field.
|
||||
func OverviewContainsFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContainsFold(FieldOverview, 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))
|
||||
}
|
||||
|
||||
// AirDateEQ applies the EQ predicate on the "air_date" field.
|
||||
func AirDateEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldAirDate, v))
|
||||
}
|
||||
|
||||
// AirDateNEQ applies the NEQ predicate on the "air_date" field.
|
||||
func AirDateNEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldAirDate, v))
|
||||
}
|
||||
|
||||
// AirDateIn applies the In predicate on the "air_date" field.
|
||||
func AirDateIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldAirDate, vs...))
|
||||
}
|
||||
|
||||
// AirDateNotIn applies the NotIn predicate on the "air_date" field.
|
||||
func AirDateNotIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldAirDate, vs...))
|
||||
}
|
||||
|
||||
// AirDateGT applies the GT predicate on the "air_date" field.
|
||||
func AirDateGT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldAirDate, v))
|
||||
}
|
||||
|
||||
// AirDateGTE applies the GTE predicate on the "air_date" field.
|
||||
func AirDateGTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldAirDate, v))
|
||||
}
|
||||
|
||||
// AirDateLT applies the LT predicate on the "air_date" field.
|
||||
func AirDateLT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldAirDate, v))
|
||||
}
|
||||
|
||||
// AirDateLTE applies the LTE predicate on the "air_date" field.
|
||||
func AirDateLTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldAirDate, v))
|
||||
}
|
||||
|
||||
// AirDateContains applies the Contains predicate on the "air_date" field.
|
||||
func AirDateContains(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContains(FieldAirDate, v))
|
||||
}
|
||||
|
||||
// AirDateHasPrefix applies the HasPrefix predicate on the "air_date" field.
|
||||
func AirDateHasPrefix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasPrefix(FieldAirDate, v))
|
||||
}
|
||||
|
||||
// AirDateHasSuffix applies the HasSuffix predicate on the "air_date" field.
|
||||
func AirDateHasSuffix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasSuffix(FieldAirDate, v))
|
||||
}
|
||||
|
||||
// AirDateEqualFold applies the EqualFold predicate on the "air_date" field.
|
||||
func AirDateEqualFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEqualFold(FieldAirDate, v))
|
||||
}
|
||||
|
||||
// AirDateContainsFold applies the ContainsFold predicate on the "air_date" field.
|
||||
func AirDateContainsFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContainsFold(FieldAirDate, v))
|
||||
}
|
||||
|
||||
// ResolutionEQ applies the EQ predicate on the "resolution" field.
|
||||
func ResolutionEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldResolution, v))
|
||||
}
|
||||
|
||||
// ResolutionNEQ applies the NEQ predicate on the "resolution" field.
|
||||
func ResolutionNEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldResolution, v))
|
||||
}
|
||||
|
||||
// ResolutionIn applies the In predicate on the "resolution" field.
|
||||
func ResolutionIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldResolution, vs...))
|
||||
}
|
||||
|
||||
// ResolutionNotIn applies the NotIn predicate on the "resolution" field.
|
||||
func ResolutionNotIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldResolution, vs...))
|
||||
}
|
||||
|
||||
// ResolutionGT applies the GT predicate on the "resolution" field.
|
||||
func ResolutionGT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldResolution, v))
|
||||
}
|
||||
|
||||
// ResolutionGTE applies the GTE predicate on the "resolution" field.
|
||||
func ResolutionGTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldResolution, v))
|
||||
}
|
||||
|
||||
// ResolutionLT applies the LT predicate on the "resolution" field.
|
||||
func ResolutionLT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldResolution, v))
|
||||
}
|
||||
|
||||
// ResolutionLTE applies the LTE predicate on the "resolution" field.
|
||||
func ResolutionLTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldResolution, v))
|
||||
}
|
||||
|
||||
// ResolutionContains applies the Contains predicate on the "resolution" field.
|
||||
func ResolutionContains(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContains(FieldResolution, v))
|
||||
}
|
||||
|
||||
// ResolutionHasPrefix applies the HasPrefix predicate on the "resolution" field.
|
||||
func ResolutionHasPrefix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasPrefix(FieldResolution, v))
|
||||
}
|
||||
|
||||
// ResolutionHasSuffix applies the HasSuffix predicate on the "resolution" field.
|
||||
func ResolutionHasSuffix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasSuffix(FieldResolution, v))
|
||||
}
|
||||
|
||||
// ResolutionEqualFold applies the EqualFold predicate on the "resolution" field.
|
||||
func ResolutionEqualFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEqualFold(FieldResolution, v))
|
||||
}
|
||||
|
||||
// ResolutionContainsFold applies the ContainsFold predicate on the "resolution" field.
|
||||
func ResolutionContainsFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContainsFold(FieldResolution, v))
|
||||
}
|
||||
|
||||
// StorageIDEQ applies the EQ predicate on the "storage_id" field.
|
||||
func StorageIDEQ(v int) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// StorageIDNEQ applies the NEQ predicate on the "storage_id" field.
|
||||
func StorageIDNEQ(v int) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// StorageIDIn applies the In predicate on the "storage_id" field.
|
||||
func StorageIDIn(vs ...int) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldStorageID, vs...))
|
||||
}
|
||||
|
||||
// StorageIDNotIn applies the NotIn predicate on the "storage_id" field.
|
||||
func StorageIDNotIn(vs ...int) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldStorageID, vs...))
|
||||
}
|
||||
|
||||
// StorageIDGT applies the GT predicate on the "storage_id" field.
|
||||
func StorageIDGT(v int) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// StorageIDGTE applies the GTE predicate on the "storage_id" field.
|
||||
func StorageIDGTE(v int) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// StorageIDLT applies the LT predicate on the "storage_id" field.
|
||||
func StorageIDLT(v int) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// StorageIDLTE applies the LTE predicate on the "storage_id" field.
|
||||
func StorageIDLTE(v int) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldStorageID, v))
|
||||
}
|
||||
|
||||
// StorageIDIsNil applies the IsNil predicate on the "storage_id" field.
|
||||
func StorageIDIsNil() predicate.Media {
|
||||
return predicate.Media(sql.FieldIsNull(FieldStorageID))
|
||||
}
|
||||
|
||||
// StorageIDNotNil applies the NotNil predicate on the "storage_id" field.
|
||||
func StorageIDNotNil() predicate.Media {
|
||||
return predicate.Media(sql.FieldNotNull(FieldStorageID))
|
||||
}
|
||||
|
||||
// TargetDirEQ applies the EQ predicate on the "target_dir" field.
|
||||
func TargetDirEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEQ(FieldTargetDir, v))
|
||||
}
|
||||
|
||||
// TargetDirNEQ applies the NEQ predicate on the "target_dir" field.
|
||||
func TargetDirNEQ(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNEQ(FieldTargetDir, v))
|
||||
}
|
||||
|
||||
// TargetDirIn applies the In predicate on the "target_dir" field.
|
||||
func TargetDirIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldIn(FieldTargetDir, vs...))
|
||||
}
|
||||
|
||||
// TargetDirNotIn applies the NotIn predicate on the "target_dir" field.
|
||||
func TargetDirNotIn(vs ...string) predicate.Media {
|
||||
return predicate.Media(sql.FieldNotIn(FieldTargetDir, vs...))
|
||||
}
|
||||
|
||||
// TargetDirGT applies the GT predicate on the "target_dir" field.
|
||||
func TargetDirGT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGT(FieldTargetDir, v))
|
||||
}
|
||||
|
||||
// TargetDirGTE applies the GTE predicate on the "target_dir" field.
|
||||
func TargetDirGTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldGTE(FieldTargetDir, v))
|
||||
}
|
||||
|
||||
// TargetDirLT applies the LT predicate on the "target_dir" field.
|
||||
func TargetDirLT(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLT(FieldTargetDir, v))
|
||||
}
|
||||
|
||||
// TargetDirLTE applies the LTE predicate on the "target_dir" field.
|
||||
func TargetDirLTE(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldLTE(FieldTargetDir, v))
|
||||
}
|
||||
|
||||
// TargetDirContains applies the Contains predicate on the "target_dir" field.
|
||||
func TargetDirContains(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContains(FieldTargetDir, v))
|
||||
}
|
||||
|
||||
// TargetDirHasPrefix applies the HasPrefix predicate on the "target_dir" field.
|
||||
func TargetDirHasPrefix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasPrefix(FieldTargetDir, v))
|
||||
}
|
||||
|
||||
// TargetDirHasSuffix applies the HasSuffix predicate on the "target_dir" field.
|
||||
func TargetDirHasSuffix(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldHasSuffix(FieldTargetDir, v))
|
||||
}
|
||||
|
||||
// TargetDirIsNil applies the IsNil predicate on the "target_dir" field.
|
||||
func TargetDirIsNil() predicate.Media {
|
||||
return predicate.Media(sql.FieldIsNull(FieldTargetDir))
|
||||
}
|
||||
|
||||
// TargetDirNotNil applies the NotNil predicate on the "target_dir" field.
|
||||
func TargetDirNotNil() predicate.Media {
|
||||
return predicate.Media(sql.FieldNotNull(FieldTargetDir))
|
||||
}
|
||||
|
||||
// TargetDirEqualFold applies the EqualFold predicate on the "target_dir" field.
|
||||
func TargetDirEqualFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldEqualFold(FieldTargetDir, v))
|
||||
}
|
||||
|
||||
// TargetDirContainsFold applies the ContainsFold predicate on the "target_dir" field.
|
||||
func TargetDirContainsFold(v string) predicate.Media {
|
||||
return predicate.Media(sql.FieldContainsFold(FieldTargetDir, v))
|
||||
}
|
||||
|
||||
// HasEpisodes applies the HasEdge predicate on the "episodes" edge.
|
||||
func HasEpisodes() predicate.Media {
|
||||
return predicate.Media(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, EpisodesTable, EpisodesColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasEpisodesWith applies the HasEdge predicate on the "episodes" edge with a given conditions (other predicates).
|
||||
func HasEpisodesWith(preds ...predicate.Episode) predicate.Media {
|
||||
return predicate.Media(func(s *sql.Selector) {
|
||||
step := newEpisodesStep()
|
||||
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))
|
||||
}
|
||||
Reference in New Issue
Block a user