[feature] migrate to monorepo
Some checks failed
Build Backend / Build Docker Image (push) Successful in 3m33s
Test Backend / test (push) Failing after 31s

This commit is contained in:
CDN 2025-02-21 00:49:20 +08:00
commit 05ddc1f783
Signed by: CDN
GPG key ID: 0C656827F9F80080
267 changed files with 75165 additions and 0 deletions

View file

@ -0,0 +1,167 @@
// Code generated by ent, DO NOT EDIT.
package postcontent
import (
"fmt"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
)
const (
// Label holds the string label denoting the postcontent type in the database.
Label = "post_content"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldLanguageCode holds the string denoting the language_code field in the database.
FieldLanguageCode = "language_code"
// FieldTitle holds the string denoting the title field in the database.
FieldTitle = "title"
// FieldContentMarkdown holds the string denoting the content_markdown field in the database.
FieldContentMarkdown = "content_markdown"
// FieldSummary holds the string denoting the summary field in the database.
FieldSummary = "summary"
// FieldMetaKeywords holds the string denoting the meta_keywords field in the database.
FieldMetaKeywords = "meta_keywords"
// FieldMetaDescription holds the string denoting the meta_description field in the database.
FieldMetaDescription = "meta_description"
// FieldSlug holds the string denoting the slug field in the database.
FieldSlug = "slug"
// EdgePost holds the string denoting the post edge name in mutations.
EdgePost = "post"
// Table holds the table name of the postcontent in the database.
Table = "post_contents"
// PostTable is the table that holds the post relation/edge.
PostTable = "post_contents"
// PostInverseTable is the table name for the Post entity.
// It exists in this package in order to avoid circular dependency with the "post" package.
PostInverseTable = "posts"
// PostColumn is the table column denoting the post relation/edge.
PostColumn = "post_contents"
)
// Columns holds all SQL columns for postcontent fields.
var Columns = []string{
FieldID,
FieldLanguageCode,
FieldTitle,
FieldContentMarkdown,
FieldSummary,
FieldMetaKeywords,
FieldMetaDescription,
FieldSlug,
}
// ForeignKeys holds the SQL foreign-keys that are owned by the "post_contents"
// table and are not defined as standalone fields in the schema.
var ForeignKeys = []string{
"post_contents",
}
// 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 (
// TitleValidator is a validator for the "title" field. It is called by the builders before save.
TitleValidator func(string) error
// ContentMarkdownValidator is a validator for the "content_markdown" field. It is called by the builders before save.
ContentMarkdownValidator func(string) error
// SummaryValidator is a validator for the "summary" field. It is called by the builders before save.
SummaryValidator func(string) error
// SlugValidator is a validator for the "slug" field. It is called by the builders before save.
SlugValidator func(string) error
)
// LanguageCode defines the type for the "language_code" enum field.
type LanguageCode string
// LanguageCode values.
const (
LanguageCodeEN LanguageCode = "en"
LanguageCodeZH_HANS LanguageCode = "zh-Hans"
LanguageCodeZH_HANT LanguageCode = "zh-Hant"
)
func (lc LanguageCode) String() string {
return string(lc)
}
// LanguageCodeValidator is a validator for the "language_code" field enum values. It is called by the builders before save.
func LanguageCodeValidator(lc LanguageCode) error {
switch lc {
case LanguageCodeEN, LanguageCodeZH_HANS, LanguageCodeZH_HANT:
return nil
default:
return fmt.Errorf("postcontent: invalid enum value for language_code field: %q", lc)
}
}
// OrderOption defines the ordering options for the PostContent 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()
}
// ByLanguageCode orders the results by the language_code field.
func ByLanguageCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLanguageCode, opts...).ToFunc()
}
// ByTitle orders the results by the title field.
func ByTitle(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTitle, opts...).ToFunc()
}
// ByContentMarkdown orders the results by the content_markdown field.
func ByContentMarkdown(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldContentMarkdown, opts...).ToFunc()
}
// BySummary orders the results by the summary field.
func BySummary(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSummary, opts...).ToFunc()
}
// ByMetaKeywords orders the results by the meta_keywords field.
func ByMetaKeywords(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMetaKeywords, opts...).ToFunc()
}
// ByMetaDescription orders the results by the meta_description field.
func ByMetaDescription(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMetaDescription, opts...).ToFunc()
}
// BySlug orders the results by the slug field.
func BySlug(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSlug, opts...).ToFunc()
}
// ByPostField orders the results by post field.
func ByPostField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newPostStep(), sql.OrderByField(field, opts...))
}
}
func newPostStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(PostInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, PostTable, PostColumn),
)
}

View file

@ -0,0 +1,553 @@
// Code generated by ent, DO NOT EDIT.
package postcontent
import (
"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.PostContent {
return predicate.PostContent(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int) predicate.PostContent {
return predicate.PostContent(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int) predicate.PostContent {
return predicate.PostContent(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int) predicate.PostContent {
return predicate.PostContent(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int) predicate.PostContent {
return predicate.PostContent(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int) predicate.PostContent {
return predicate.PostContent(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int) predicate.PostContent {
return predicate.PostContent(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int) predicate.PostContent {
return predicate.PostContent(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int) predicate.PostContent {
return predicate.PostContent(sql.FieldLTE(FieldID, id))
}
// Title applies equality check predicate on the "title" field. It's identical to TitleEQ.
func Title(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEQ(FieldTitle, v))
}
// ContentMarkdown applies equality check predicate on the "content_markdown" field. It's identical to ContentMarkdownEQ.
func ContentMarkdown(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEQ(FieldContentMarkdown, v))
}
// Summary applies equality check predicate on the "summary" field. It's identical to SummaryEQ.
func Summary(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEQ(FieldSummary, v))
}
// MetaKeywords applies equality check predicate on the "meta_keywords" field. It's identical to MetaKeywordsEQ.
func MetaKeywords(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEQ(FieldMetaKeywords, v))
}
// MetaDescription applies equality check predicate on the "meta_description" field. It's identical to MetaDescriptionEQ.
func MetaDescription(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEQ(FieldMetaDescription, v))
}
// Slug applies equality check predicate on the "slug" field. It's identical to SlugEQ.
func Slug(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEQ(FieldSlug, v))
}
// LanguageCodeEQ applies the EQ predicate on the "language_code" field.
func LanguageCodeEQ(v LanguageCode) predicate.PostContent {
return predicate.PostContent(sql.FieldEQ(FieldLanguageCode, v))
}
// LanguageCodeNEQ applies the NEQ predicate on the "language_code" field.
func LanguageCodeNEQ(v LanguageCode) predicate.PostContent {
return predicate.PostContent(sql.FieldNEQ(FieldLanguageCode, v))
}
// LanguageCodeIn applies the In predicate on the "language_code" field.
func LanguageCodeIn(vs ...LanguageCode) predicate.PostContent {
return predicate.PostContent(sql.FieldIn(FieldLanguageCode, vs...))
}
// LanguageCodeNotIn applies the NotIn predicate on the "language_code" field.
func LanguageCodeNotIn(vs ...LanguageCode) predicate.PostContent {
return predicate.PostContent(sql.FieldNotIn(FieldLanguageCode, vs...))
}
// TitleEQ applies the EQ predicate on the "title" field.
func TitleEQ(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEQ(FieldTitle, v))
}
// TitleNEQ applies the NEQ predicate on the "title" field.
func TitleNEQ(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldNEQ(FieldTitle, v))
}
// TitleIn applies the In predicate on the "title" field.
func TitleIn(vs ...string) predicate.PostContent {
return predicate.PostContent(sql.FieldIn(FieldTitle, vs...))
}
// TitleNotIn applies the NotIn predicate on the "title" field.
func TitleNotIn(vs ...string) predicate.PostContent {
return predicate.PostContent(sql.FieldNotIn(FieldTitle, vs...))
}
// TitleGT applies the GT predicate on the "title" field.
func TitleGT(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldGT(FieldTitle, v))
}
// TitleGTE applies the GTE predicate on the "title" field.
func TitleGTE(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldGTE(FieldTitle, v))
}
// TitleLT applies the LT predicate on the "title" field.
func TitleLT(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldLT(FieldTitle, v))
}
// TitleLTE applies the LTE predicate on the "title" field.
func TitleLTE(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldLTE(FieldTitle, v))
}
// TitleContains applies the Contains predicate on the "title" field.
func TitleContains(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldContains(FieldTitle, v))
}
// TitleHasPrefix applies the HasPrefix predicate on the "title" field.
func TitleHasPrefix(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldHasPrefix(FieldTitle, v))
}
// TitleHasSuffix applies the HasSuffix predicate on the "title" field.
func TitleHasSuffix(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldHasSuffix(FieldTitle, v))
}
// TitleEqualFold applies the EqualFold predicate on the "title" field.
func TitleEqualFold(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEqualFold(FieldTitle, v))
}
// TitleContainsFold applies the ContainsFold predicate on the "title" field.
func TitleContainsFold(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldContainsFold(FieldTitle, v))
}
// ContentMarkdownEQ applies the EQ predicate on the "content_markdown" field.
func ContentMarkdownEQ(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEQ(FieldContentMarkdown, v))
}
// ContentMarkdownNEQ applies the NEQ predicate on the "content_markdown" field.
func ContentMarkdownNEQ(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldNEQ(FieldContentMarkdown, v))
}
// ContentMarkdownIn applies the In predicate on the "content_markdown" field.
func ContentMarkdownIn(vs ...string) predicate.PostContent {
return predicate.PostContent(sql.FieldIn(FieldContentMarkdown, vs...))
}
// ContentMarkdownNotIn applies the NotIn predicate on the "content_markdown" field.
func ContentMarkdownNotIn(vs ...string) predicate.PostContent {
return predicate.PostContent(sql.FieldNotIn(FieldContentMarkdown, vs...))
}
// ContentMarkdownGT applies the GT predicate on the "content_markdown" field.
func ContentMarkdownGT(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldGT(FieldContentMarkdown, v))
}
// ContentMarkdownGTE applies the GTE predicate on the "content_markdown" field.
func ContentMarkdownGTE(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldGTE(FieldContentMarkdown, v))
}
// ContentMarkdownLT applies the LT predicate on the "content_markdown" field.
func ContentMarkdownLT(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldLT(FieldContentMarkdown, v))
}
// ContentMarkdownLTE applies the LTE predicate on the "content_markdown" field.
func ContentMarkdownLTE(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldLTE(FieldContentMarkdown, v))
}
// ContentMarkdownContains applies the Contains predicate on the "content_markdown" field.
func ContentMarkdownContains(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldContains(FieldContentMarkdown, v))
}
// ContentMarkdownHasPrefix applies the HasPrefix predicate on the "content_markdown" field.
func ContentMarkdownHasPrefix(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldHasPrefix(FieldContentMarkdown, v))
}
// ContentMarkdownHasSuffix applies the HasSuffix predicate on the "content_markdown" field.
func ContentMarkdownHasSuffix(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldHasSuffix(FieldContentMarkdown, v))
}
// ContentMarkdownEqualFold applies the EqualFold predicate on the "content_markdown" field.
func ContentMarkdownEqualFold(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEqualFold(FieldContentMarkdown, v))
}
// ContentMarkdownContainsFold applies the ContainsFold predicate on the "content_markdown" field.
func ContentMarkdownContainsFold(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldContainsFold(FieldContentMarkdown, v))
}
// SummaryEQ applies the EQ predicate on the "summary" field.
func SummaryEQ(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEQ(FieldSummary, v))
}
// SummaryNEQ applies the NEQ predicate on the "summary" field.
func SummaryNEQ(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldNEQ(FieldSummary, v))
}
// SummaryIn applies the In predicate on the "summary" field.
func SummaryIn(vs ...string) predicate.PostContent {
return predicate.PostContent(sql.FieldIn(FieldSummary, vs...))
}
// SummaryNotIn applies the NotIn predicate on the "summary" field.
func SummaryNotIn(vs ...string) predicate.PostContent {
return predicate.PostContent(sql.FieldNotIn(FieldSummary, vs...))
}
// SummaryGT applies the GT predicate on the "summary" field.
func SummaryGT(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldGT(FieldSummary, v))
}
// SummaryGTE applies the GTE predicate on the "summary" field.
func SummaryGTE(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldGTE(FieldSummary, v))
}
// SummaryLT applies the LT predicate on the "summary" field.
func SummaryLT(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldLT(FieldSummary, v))
}
// SummaryLTE applies the LTE predicate on the "summary" field.
func SummaryLTE(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldLTE(FieldSummary, v))
}
// SummaryContains applies the Contains predicate on the "summary" field.
func SummaryContains(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldContains(FieldSummary, v))
}
// SummaryHasPrefix applies the HasPrefix predicate on the "summary" field.
func SummaryHasPrefix(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldHasPrefix(FieldSummary, v))
}
// SummaryHasSuffix applies the HasSuffix predicate on the "summary" field.
func SummaryHasSuffix(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldHasSuffix(FieldSummary, v))
}
// SummaryEqualFold applies the EqualFold predicate on the "summary" field.
func SummaryEqualFold(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEqualFold(FieldSummary, v))
}
// SummaryContainsFold applies the ContainsFold predicate on the "summary" field.
func SummaryContainsFold(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldContainsFold(FieldSummary, v))
}
// MetaKeywordsEQ applies the EQ predicate on the "meta_keywords" field.
func MetaKeywordsEQ(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEQ(FieldMetaKeywords, v))
}
// MetaKeywordsNEQ applies the NEQ predicate on the "meta_keywords" field.
func MetaKeywordsNEQ(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldNEQ(FieldMetaKeywords, v))
}
// MetaKeywordsIn applies the In predicate on the "meta_keywords" field.
func MetaKeywordsIn(vs ...string) predicate.PostContent {
return predicate.PostContent(sql.FieldIn(FieldMetaKeywords, vs...))
}
// MetaKeywordsNotIn applies the NotIn predicate on the "meta_keywords" field.
func MetaKeywordsNotIn(vs ...string) predicate.PostContent {
return predicate.PostContent(sql.FieldNotIn(FieldMetaKeywords, vs...))
}
// MetaKeywordsGT applies the GT predicate on the "meta_keywords" field.
func MetaKeywordsGT(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldGT(FieldMetaKeywords, v))
}
// MetaKeywordsGTE applies the GTE predicate on the "meta_keywords" field.
func MetaKeywordsGTE(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldGTE(FieldMetaKeywords, v))
}
// MetaKeywordsLT applies the LT predicate on the "meta_keywords" field.
func MetaKeywordsLT(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldLT(FieldMetaKeywords, v))
}
// MetaKeywordsLTE applies the LTE predicate on the "meta_keywords" field.
func MetaKeywordsLTE(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldLTE(FieldMetaKeywords, v))
}
// MetaKeywordsContains applies the Contains predicate on the "meta_keywords" field.
func MetaKeywordsContains(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldContains(FieldMetaKeywords, v))
}
// MetaKeywordsHasPrefix applies the HasPrefix predicate on the "meta_keywords" field.
func MetaKeywordsHasPrefix(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldHasPrefix(FieldMetaKeywords, v))
}
// MetaKeywordsHasSuffix applies the HasSuffix predicate on the "meta_keywords" field.
func MetaKeywordsHasSuffix(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldHasSuffix(FieldMetaKeywords, v))
}
// MetaKeywordsIsNil applies the IsNil predicate on the "meta_keywords" field.
func MetaKeywordsIsNil() predicate.PostContent {
return predicate.PostContent(sql.FieldIsNull(FieldMetaKeywords))
}
// MetaKeywordsNotNil applies the NotNil predicate on the "meta_keywords" field.
func MetaKeywordsNotNil() predicate.PostContent {
return predicate.PostContent(sql.FieldNotNull(FieldMetaKeywords))
}
// MetaKeywordsEqualFold applies the EqualFold predicate on the "meta_keywords" field.
func MetaKeywordsEqualFold(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEqualFold(FieldMetaKeywords, v))
}
// MetaKeywordsContainsFold applies the ContainsFold predicate on the "meta_keywords" field.
func MetaKeywordsContainsFold(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldContainsFold(FieldMetaKeywords, v))
}
// MetaDescriptionEQ applies the EQ predicate on the "meta_description" field.
func MetaDescriptionEQ(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEQ(FieldMetaDescription, v))
}
// MetaDescriptionNEQ applies the NEQ predicate on the "meta_description" field.
func MetaDescriptionNEQ(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldNEQ(FieldMetaDescription, v))
}
// MetaDescriptionIn applies the In predicate on the "meta_description" field.
func MetaDescriptionIn(vs ...string) predicate.PostContent {
return predicate.PostContent(sql.FieldIn(FieldMetaDescription, vs...))
}
// MetaDescriptionNotIn applies the NotIn predicate on the "meta_description" field.
func MetaDescriptionNotIn(vs ...string) predicate.PostContent {
return predicate.PostContent(sql.FieldNotIn(FieldMetaDescription, vs...))
}
// MetaDescriptionGT applies the GT predicate on the "meta_description" field.
func MetaDescriptionGT(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldGT(FieldMetaDescription, v))
}
// MetaDescriptionGTE applies the GTE predicate on the "meta_description" field.
func MetaDescriptionGTE(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldGTE(FieldMetaDescription, v))
}
// MetaDescriptionLT applies the LT predicate on the "meta_description" field.
func MetaDescriptionLT(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldLT(FieldMetaDescription, v))
}
// MetaDescriptionLTE applies the LTE predicate on the "meta_description" field.
func MetaDescriptionLTE(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldLTE(FieldMetaDescription, v))
}
// MetaDescriptionContains applies the Contains predicate on the "meta_description" field.
func MetaDescriptionContains(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldContains(FieldMetaDescription, v))
}
// MetaDescriptionHasPrefix applies the HasPrefix predicate on the "meta_description" field.
func MetaDescriptionHasPrefix(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldHasPrefix(FieldMetaDescription, v))
}
// MetaDescriptionHasSuffix applies the HasSuffix predicate on the "meta_description" field.
func MetaDescriptionHasSuffix(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldHasSuffix(FieldMetaDescription, v))
}
// MetaDescriptionIsNil applies the IsNil predicate on the "meta_description" field.
func MetaDescriptionIsNil() predicate.PostContent {
return predicate.PostContent(sql.FieldIsNull(FieldMetaDescription))
}
// MetaDescriptionNotNil applies the NotNil predicate on the "meta_description" field.
func MetaDescriptionNotNil() predicate.PostContent {
return predicate.PostContent(sql.FieldNotNull(FieldMetaDescription))
}
// MetaDescriptionEqualFold applies the EqualFold predicate on the "meta_description" field.
func MetaDescriptionEqualFold(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEqualFold(FieldMetaDescription, v))
}
// MetaDescriptionContainsFold applies the ContainsFold predicate on the "meta_description" field.
func MetaDescriptionContainsFold(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldContainsFold(FieldMetaDescription, v))
}
// SlugEQ applies the EQ predicate on the "slug" field.
func SlugEQ(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEQ(FieldSlug, v))
}
// SlugNEQ applies the NEQ predicate on the "slug" field.
func SlugNEQ(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldNEQ(FieldSlug, v))
}
// SlugIn applies the In predicate on the "slug" field.
func SlugIn(vs ...string) predicate.PostContent {
return predicate.PostContent(sql.FieldIn(FieldSlug, vs...))
}
// SlugNotIn applies the NotIn predicate on the "slug" field.
func SlugNotIn(vs ...string) predicate.PostContent {
return predicate.PostContent(sql.FieldNotIn(FieldSlug, vs...))
}
// SlugGT applies the GT predicate on the "slug" field.
func SlugGT(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldGT(FieldSlug, v))
}
// SlugGTE applies the GTE predicate on the "slug" field.
func SlugGTE(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldGTE(FieldSlug, v))
}
// SlugLT applies the LT predicate on the "slug" field.
func SlugLT(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldLT(FieldSlug, v))
}
// SlugLTE applies the LTE predicate on the "slug" field.
func SlugLTE(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldLTE(FieldSlug, v))
}
// SlugContains applies the Contains predicate on the "slug" field.
func SlugContains(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldContains(FieldSlug, v))
}
// SlugHasPrefix applies the HasPrefix predicate on the "slug" field.
func SlugHasPrefix(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldHasPrefix(FieldSlug, v))
}
// SlugHasSuffix applies the HasSuffix predicate on the "slug" field.
func SlugHasSuffix(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldHasSuffix(FieldSlug, v))
}
// SlugEqualFold applies the EqualFold predicate on the "slug" field.
func SlugEqualFold(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldEqualFold(FieldSlug, v))
}
// SlugContainsFold applies the ContainsFold predicate on the "slug" field.
func SlugContainsFold(v string) predicate.PostContent {
return predicate.PostContent(sql.FieldContainsFold(FieldSlug, v))
}
// HasPost applies the HasEdge predicate on the "post" edge.
func HasPost() predicate.PostContent {
return predicate.PostContent(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, PostTable, PostColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasPostWith applies the HasEdge predicate on the "post" edge with a given conditions (other predicates).
func HasPostWith(preds ...predicate.Post) predicate.PostContent {
return predicate.PostContent(func(s *sql.Selector) {
step := newPostStep()
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.PostContent) predicate.PostContent {
return predicate.PostContent(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.PostContent) predicate.PostContent {
return predicate.PostContent(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.PostContent) predicate.PostContent {
return predicate.PostContent(sql.NotPredicates(p))
}