feat: community RPC 从内存存储迁移到 ent 数据库
This commit is contained in:
@@ -0,0 +1,174 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package posts
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the posts type in the database.
|
||||
Label = "posts"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldAuthorID holds the string denoting the author_id field in the database.
|
||||
FieldAuthorID = "author_id"
|
||||
// FieldAuthorRole holds the string denoting the author_role field in the database.
|
||||
FieldAuthorRole = "author_role"
|
||||
// FieldTitle holds the string denoting the title field in the database.
|
||||
FieldTitle = "title"
|
||||
// FieldContent holds the string denoting the content field in the database.
|
||||
FieldContent = "content"
|
||||
// FieldImages holds the string denoting the images field in the database.
|
||||
FieldImages = "images"
|
||||
// FieldTags holds the string denoting the tags field in the database.
|
||||
FieldTags = "tags"
|
||||
// FieldLinkedOrderID holds the string denoting the linked_order_id field in the database.
|
||||
FieldLinkedOrderID = "linked_order_id"
|
||||
// FieldQuotedPostID holds the string denoting the quoted_post_id field in the database.
|
||||
FieldQuotedPostID = "quoted_post_id"
|
||||
// FieldLikeCount holds the string denoting the like_count field in the database.
|
||||
FieldLikeCount = "like_count"
|
||||
// FieldCommentCount holds the string denoting the comment_count field in the database.
|
||||
FieldCommentCount = "comment_count"
|
||||
// FieldPinned holds the string denoting the pinned field in the database.
|
||||
FieldPinned = "pinned"
|
||||
// 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"
|
||||
// FieldDeletedAt holds the string denoting the deleted_at field in the database.
|
||||
FieldDeletedAt = "deleted_at"
|
||||
// Table holds the table name of the posts in the database.
|
||||
Table = "posts"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for posts fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldAuthorID,
|
||||
FieldAuthorRole,
|
||||
FieldTitle,
|
||||
FieldContent,
|
||||
FieldImages,
|
||||
FieldTags,
|
||||
FieldLinkedOrderID,
|
||||
FieldQuotedPostID,
|
||||
FieldLikeCount,
|
||||
FieldCommentCount,
|
||||
FieldPinned,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
FieldDeletedAt,
|
||||
}
|
||||
|
||||
// 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 (
|
||||
// DefaultAuthorRole holds the default value on creation for the "author_role" field.
|
||||
DefaultAuthorRole string
|
||||
// AuthorRoleValidator is a validator for the "author_role" field. It is called by the builders before save.
|
||||
AuthorRoleValidator func(string) error
|
||||
// TitleValidator is a validator for the "title" field. It is called by the builders before save.
|
||||
TitleValidator func(string) error
|
||||
// DefaultLikeCount holds the default value on creation for the "like_count" field.
|
||||
DefaultLikeCount int
|
||||
// DefaultCommentCount holds the default value on creation for the "comment_count" field.
|
||||
DefaultCommentCount int
|
||||
// DefaultPinned holds the default value on creation for the "pinned" field.
|
||||
DefaultPinned bool
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() time.Time
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
|
||||
DefaultUpdatedAt func() time.Time
|
||||
// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
|
||||
UpdateDefaultUpdatedAt func() time.Time
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the Posts 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()
|
||||
}
|
||||
|
||||
// ByAuthorID orders the results by the author_id field.
|
||||
func ByAuthorID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAuthorID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAuthorRole orders the results by the author_role field.
|
||||
func ByAuthorRole(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAuthorRole, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTitle orders the results by the title field.
|
||||
func ByTitle(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTitle, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByContent orders the results by the content field.
|
||||
func ByContent(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldContent, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByImages orders the results by the images field.
|
||||
func ByImages(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldImages, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTags orders the results by the tags field.
|
||||
func ByTags(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTags, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLinkedOrderID orders the results by the linked_order_id field.
|
||||
func ByLinkedOrderID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLinkedOrderID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByQuotedPostID orders the results by the quoted_post_id field.
|
||||
func ByQuotedPostID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldQuotedPostID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLikeCount orders the results by the like_count field.
|
||||
func ByLikeCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLikeCount, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCommentCount orders the results by the comment_count field.
|
||||
func ByCommentCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCommentCount, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPinned orders the results by the pinned field.
|
||||
func ByPinned(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPinned, 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()
|
||||
}
|
||||
|
||||
// ByDeletedAt orders the results by the deleted_at field.
|
||||
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDeletedAt, opts...).ToFunc()
|
||||
}
|
||||
@@ -0,0 +1,826 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package posts
|
||||
|
||||
import (
|
||||
"juwan-backend/app/community/rpc/internal/models/predicate"
|
||||
"juwan-backend/pkg/types"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// AuthorID applies equality check predicate on the "author_id" field. It's identical to AuthorIDEQ.
|
||||
func AuthorID(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldAuthorID, v))
|
||||
}
|
||||
|
||||
// AuthorRole applies equality check predicate on the "author_role" field. It's identical to AuthorRoleEQ.
|
||||
func AuthorRole(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldAuthorRole, v))
|
||||
}
|
||||
|
||||
// Title applies equality check predicate on the "title" field. It's identical to TitleEQ.
|
||||
func Title(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldTitle, v))
|
||||
}
|
||||
|
||||
// Content applies equality check predicate on the "content" field. It's identical to ContentEQ.
|
||||
func Content(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldContent, v))
|
||||
}
|
||||
|
||||
// Images applies equality check predicate on the "images" field. It's identical to ImagesEQ.
|
||||
func Images(v types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldImages, v))
|
||||
}
|
||||
|
||||
// Tags applies equality check predicate on the "tags" field. It's identical to TagsEQ.
|
||||
func Tags(v types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldTags, v))
|
||||
}
|
||||
|
||||
// LinkedOrderID applies equality check predicate on the "linked_order_id" field. It's identical to LinkedOrderIDEQ.
|
||||
func LinkedOrderID(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldLinkedOrderID, v))
|
||||
}
|
||||
|
||||
// QuotedPostID applies equality check predicate on the "quoted_post_id" field. It's identical to QuotedPostIDEQ.
|
||||
func QuotedPostID(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldQuotedPostID, v))
|
||||
}
|
||||
|
||||
// LikeCount applies equality check predicate on the "like_count" field. It's identical to LikeCountEQ.
|
||||
func LikeCount(v int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldLikeCount, v))
|
||||
}
|
||||
|
||||
// CommentCount applies equality check predicate on the "comment_count" field. It's identical to CommentCountEQ.
|
||||
func CommentCount(v int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldCommentCount, v))
|
||||
}
|
||||
|
||||
// Pinned applies equality check predicate on the "pinned" field. It's identical to PinnedEQ.
|
||||
func Pinned(v bool) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldPinned, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(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.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
|
||||
func DeletedAt(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// AuthorIDEQ applies the EQ predicate on the "author_id" field.
|
||||
func AuthorIDEQ(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldAuthorID, v))
|
||||
}
|
||||
|
||||
// AuthorIDNEQ applies the NEQ predicate on the "author_id" field.
|
||||
func AuthorIDNEQ(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNEQ(FieldAuthorID, v))
|
||||
}
|
||||
|
||||
// AuthorIDIn applies the In predicate on the "author_id" field.
|
||||
func AuthorIDIn(vs ...int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIn(FieldAuthorID, vs...))
|
||||
}
|
||||
|
||||
// AuthorIDNotIn applies the NotIn predicate on the "author_id" field.
|
||||
func AuthorIDNotIn(vs ...int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotIn(FieldAuthorID, vs...))
|
||||
}
|
||||
|
||||
// AuthorIDGT applies the GT predicate on the "author_id" field.
|
||||
func AuthorIDGT(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGT(FieldAuthorID, v))
|
||||
}
|
||||
|
||||
// AuthorIDGTE applies the GTE predicate on the "author_id" field.
|
||||
func AuthorIDGTE(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGTE(FieldAuthorID, v))
|
||||
}
|
||||
|
||||
// AuthorIDLT applies the LT predicate on the "author_id" field.
|
||||
func AuthorIDLT(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLT(FieldAuthorID, v))
|
||||
}
|
||||
|
||||
// AuthorIDLTE applies the LTE predicate on the "author_id" field.
|
||||
func AuthorIDLTE(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLTE(FieldAuthorID, v))
|
||||
}
|
||||
|
||||
// AuthorRoleEQ applies the EQ predicate on the "author_role" field.
|
||||
func AuthorRoleEQ(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldAuthorRole, v))
|
||||
}
|
||||
|
||||
// AuthorRoleNEQ applies the NEQ predicate on the "author_role" field.
|
||||
func AuthorRoleNEQ(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNEQ(FieldAuthorRole, v))
|
||||
}
|
||||
|
||||
// AuthorRoleIn applies the In predicate on the "author_role" field.
|
||||
func AuthorRoleIn(vs ...string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIn(FieldAuthorRole, vs...))
|
||||
}
|
||||
|
||||
// AuthorRoleNotIn applies the NotIn predicate on the "author_role" field.
|
||||
func AuthorRoleNotIn(vs ...string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotIn(FieldAuthorRole, vs...))
|
||||
}
|
||||
|
||||
// AuthorRoleGT applies the GT predicate on the "author_role" field.
|
||||
func AuthorRoleGT(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGT(FieldAuthorRole, v))
|
||||
}
|
||||
|
||||
// AuthorRoleGTE applies the GTE predicate on the "author_role" field.
|
||||
func AuthorRoleGTE(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGTE(FieldAuthorRole, v))
|
||||
}
|
||||
|
||||
// AuthorRoleLT applies the LT predicate on the "author_role" field.
|
||||
func AuthorRoleLT(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLT(FieldAuthorRole, v))
|
||||
}
|
||||
|
||||
// AuthorRoleLTE applies the LTE predicate on the "author_role" field.
|
||||
func AuthorRoleLTE(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLTE(FieldAuthorRole, v))
|
||||
}
|
||||
|
||||
// AuthorRoleContains applies the Contains predicate on the "author_role" field.
|
||||
func AuthorRoleContains(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldContains(FieldAuthorRole, v))
|
||||
}
|
||||
|
||||
// AuthorRoleHasPrefix applies the HasPrefix predicate on the "author_role" field.
|
||||
func AuthorRoleHasPrefix(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldHasPrefix(FieldAuthorRole, v))
|
||||
}
|
||||
|
||||
// AuthorRoleHasSuffix applies the HasSuffix predicate on the "author_role" field.
|
||||
func AuthorRoleHasSuffix(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldHasSuffix(FieldAuthorRole, v))
|
||||
}
|
||||
|
||||
// AuthorRoleEqualFold applies the EqualFold predicate on the "author_role" field.
|
||||
func AuthorRoleEqualFold(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEqualFold(FieldAuthorRole, v))
|
||||
}
|
||||
|
||||
// AuthorRoleContainsFold applies the ContainsFold predicate on the "author_role" field.
|
||||
func AuthorRoleContainsFold(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldContainsFold(FieldAuthorRole, v))
|
||||
}
|
||||
|
||||
// TitleEQ applies the EQ predicate on the "title" field.
|
||||
func TitleEQ(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleNEQ applies the NEQ predicate on the "title" field.
|
||||
func TitleNEQ(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNEQ(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleIn applies the In predicate on the "title" field.
|
||||
func TitleIn(vs ...string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIn(FieldTitle, vs...))
|
||||
}
|
||||
|
||||
// TitleNotIn applies the NotIn predicate on the "title" field.
|
||||
func TitleNotIn(vs ...string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotIn(FieldTitle, vs...))
|
||||
}
|
||||
|
||||
// TitleGT applies the GT predicate on the "title" field.
|
||||
func TitleGT(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGT(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleGTE applies the GTE predicate on the "title" field.
|
||||
func TitleGTE(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGTE(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleLT applies the LT predicate on the "title" field.
|
||||
func TitleLT(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLT(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleLTE applies the LTE predicate on the "title" field.
|
||||
func TitleLTE(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLTE(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleContains applies the Contains predicate on the "title" field.
|
||||
func TitleContains(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldContains(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleHasPrefix applies the HasPrefix predicate on the "title" field.
|
||||
func TitleHasPrefix(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldHasPrefix(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleHasSuffix applies the HasSuffix predicate on the "title" field.
|
||||
func TitleHasSuffix(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldHasSuffix(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleEqualFold applies the EqualFold predicate on the "title" field.
|
||||
func TitleEqualFold(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEqualFold(FieldTitle, v))
|
||||
}
|
||||
|
||||
// TitleContainsFold applies the ContainsFold predicate on the "title" field.
|
||||
func TitleContainsFold(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldContainsFold(FieldTitle, v))
|
||||
}
|
||||
|
||||
// ContentEQ applies the EQ predicate on the "content" field.
|
||||
func ContentEQ(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentNEQ applies the NEQ predicate on the "content" field.
|
||||
func ContentNEQ(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNEQ(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentIn applies the In predicate on the "content" field.
|
||||
func ContentIn(vs ...string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIn(FieldContent, vs...))
|
||||
}
|
||||
|
||||
// ContentNotIn applies the NotIn predicate on the "content" field.
|
||||
func ContentNotIn(vs ...string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotIn(FieldContent, vs...))
|
||||
}
|
||||
|
||||
// ContentGT applies the GT predicate on the "content" field.
|
||||
func ContentGT(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGT(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentGTE applies the GTE predicate on the "content" field.
|
||||
func ContentGTE(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGTE(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentLT applies the LT predicate on the "content" field.
|
||||
func ContentLT(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLT(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentLTE applies the LTE predicate on the "content" field.
|
||||
func ContentLTE(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLTE(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentContains applies the Contains predicate on the "content" field.
|
||||
func ContentContains(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldContains(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentHasPrefix applies the HasPrefix predicate on the "content" field.
|
||||
func ContentHasPrefix(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldHasPrefix(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentHasSuffix applies the HasSuffix predicate on the "content" field.
|
||||
func ContentHasSuffix(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldHasSuffix(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentEqualFold applies the EqualFold predicate on the "content" field.
|
||||
func ContentEqualFold(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEqualFold(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentContainsFold applies the ContainsFold predicate on the "content" field.
|
||||
func ContentContainsFold(v string) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldContainsFold(FieldContent, v))
|
||||
}
|
||||
|
||||
// ImagesEQ applies the EQ predicate on the "images" field.
|
||||
func ImagesEQ(v types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldImages, v))
|
||||
}
|
||||
|
||||
// ImagesNEQ applies the NEQ predicate on the "images" field.
|
||||
func ImagesNEQ(v types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNEQ(FieldImages, v))
|
||||
}
|
||||
|
||||
// ImagesIn applies the In predicate on the "images" field.
|
||||
func ImagesIn(vs ...types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIn(FieldImages, vs...))
|
||||
}
|
||||
|
||||
// ImagesNotIn applies the NotIn predicate on the "images" field.
|
||||
func ImagesNotIn(vs ...types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotIn(FieldImages, vs...))
|
||||
}
|
||||
|
||||
// ImagesGT applies the GT predicate on the "images" field.
|
||||
func ImagesGT(v types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGT(FieldImages, v))
|
||||
}
|
||||
|
||||
// ImagesGTE applies the GTE predicate on the "images" field.
|
||||
func ImagesGTE(v types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGTE(FieldImages, v))
|
||||
}
|
||||
|
||||
// ImagesLT applies the LT predicate on the "images" field.
|
||||
func ImagesLT(v types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLT(FieldImages, v))
|
||||
}
|
||||
|
||||
// ImagesLTE applies the LTE predicate on the "images" field.
|
||||
func ImagesLTE(v types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLTE(FieldImages, v))
|
||||
}
|
||||
|
||||
// ImagesIsNil applies the IsNil predicate on the "images" field.
|
||||
func ImagesIsNil() predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIsNull(FieldImages))
|
||||
}
|
||||
|
||||
// ImagesNotNil applies the NotNil predicate on the "images" field.
|
||||
func ImagesNotNil() predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotNull(FieldImages))
|
||||
}
|
||||
|
||||
// TagsEQ applies the EQ predicate on the "tags" field.
|
||||
func TagsEQ(v types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldTags, v))
|
||||
}
|
||||
|
||||
// TagsNEQ applies the NEQ predicate on the "tags" field.
|
||||
func TagsNEQ(v types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNEQ(FieldTags, v))
|
||||
}
|
||||
|
||||
// TagsIn applies the In predicate on the "tags" field.
|
||||
func TagsIn(vs ...types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIn(FieldTags, vs...))
|
||||
}
|
||||
|
||||
// TagsNotIn applies the NotIn predicate on the "tags" field.
|
||||
func TagsNotIn(vs ...types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotIn(FieldTags, vs...))
|
||||
}
|
||||
|
||||
// TagsGT applies the GT predicate on the "tags" field.
|
||||
func TagsGT(v types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGT(FieldTags, v))
|
||||
}
|
||||
|
||||
// TagsGTE applies the GTE predicate on the "tags" field.
|
||||
func TagsGTE(v types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGTE(FieldTags, v))
|
||||
}
|
||||
|
||||
// TagsLT applies the LT predicate on the "tags" field.
|
||||
func TagsLT(v types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLT(FieldTags, v))
|
||||
}
|
||||
|
||||
// TagsLTE applies the LTE predicate on the "tags" field.
|
||||
func TagsLTE(v types.TextArray) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLTE(FieldTags, v))
|
||||
}
|
||||
|
||||
// TagsIsNil applies the IsNil predicate on the "tags" field.
|
||||
func TagsIsNil() predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIsNull(FieldTags))
|
||||
}
|
||||
|
||||
// TagsNotNil applies the NotNil predicate on the "tags" field.
|
||||
func TagsNotNil() predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotNull(FieldTags))
|
||||
}
|
||||
|
||||
// LinkedOrderIDEQ applies the EQ predicate on the "linked_order_id" field.
|
||||
func LinkedOrderIDEQ(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldLinkedOrderID, v))
|
||||
}
|
||||
|
||||
// LinkedOrderIDNEQ applies the NEQ predicate on the "linked_order_id" field.
|
||||
func LinkedOrderIDNEQ(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNEQ(FieldLinkedOrderID, v))
|
||||
}
|
||||
|
||||
// LinkedOrderIDIn applies the In predicate on the "linked_order_id" field.
|
||||
func LinkedOrderIDIn(vs ...int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIn(FieldLinkedOrderID, vs...))
|
||||
}
|
||||
|
||||
// LinkedOrderIDNotIn applies the NotIn predicate on the "linked_order_id" field.
|
||||
func LinkedOrderIDNotIn(vs ...int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotIn(FieldLinkedOrderID, vs...))
|
||||
}
|
||||
|
||||
// LinkedOrderIDGT applies the GT predicate on the "linked_order_id" field.
|
||||
func LinkedOrderIDGT(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGT(FieldLinkedOrderID, v))
|
||||
}
|
||||
|
||||
// LinkedOrderIDGTE applies the GTE predicate on the "linked_order_id" field.
|
||||
func LinkedOrderIDGTE(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGTE(FieldLinkedOrderID, v))
|
||||
}
|
||||
|
||||
// LinkedOrderIDLT applies the LT predicate on the "linked_order_id" field.
|
||||
func LinkedOrderIDLT(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLT(FieldLinkedOrderID, v))
|
||||
}
|
||||
|
||||
// LinkedOrderIDLTE applies the LTE predicate on the "linked_order_id" field.
|
||||
func LinkedOrderIDLTE(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLTE(FieldLinkedOrderID, v))
|
||||
}
|
||||
|
||||
// LinkedOrderIDIsNil applies the IsNil predicate on the "linked_order_id" field.
|
||||
func LinkedOrderIDIsNil() predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIsNull(FieldLinkedOrderID))
|
||||
}
|
||||
|
||||
// LinkedOrderIDNotNil applies the NotNil predicate on the "linked_order_id" field.
|
||||
func LinkedOrderIDNotNil() predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotNull(FieldLinkedOrderID))
|
||||
}
|
||||
|
||||
// QuotedPostIDEQ applies the EQ predicate on the "quoted_post_id" field.
|
||||
func QuotedPostIDEQ(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldQuotedPostID, v))
|
||||
}
|
||||
|
||||
// QuotedPostIDNEQ applies the NEQ predicate on the "quoted_post_id" field.
|
||||
func QuotedPostIDNEQ(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNEQ(FieldQuotedPostID, v))
|
||||
}
|
||||
|
||||
// QuotedPostIDIn applies the In predicate on the "quoted_post_id" field.
|
||||
func QuotedPostIDIn(vs ...int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIn(FieldQuotedPostID, vs...))
|
||||
}
|
||||
|
||||
// QuotedPostIDNotIn applies the NotIn predicate on the "quoted_post_id" field.
|
||||
func QuotedPostIDNotIn(vs ...int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotIn(FieldQuotedPostID, vs...))
|
||||
}
|
||||
|
||||
// QuotedPostIDGT applies the GT predicate on the "quoted_post_id" field.
|
||||
func QuotedPostIDGT(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGT(FieldQuotedPostID, v))
|
||||
}
|
||||
|
||||
// QuotedPostIDGTE applies the GTE predicate on the "quoted_post_id" field.
|
||||
func QuotedPostIDGTE(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGTE(FieldQuotedPostID, v))
|
||||
}
|
||||
|
||||
// QuotedPostIDLT applies the LT predicate on the "quoted_post_id" field.
|
||||
func QuotedPostIDLT(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLT(FieldQuotedPostID, v))
|
||||
}
|
||||
|
||||
// QuotedPostIDLTE applies the LTE predicate on the "quoted_post_id" field.
|
||||
func QuotedPostIDLTE(v int64) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLTE(FieldQuotedPostID, v))
|
||||
}
|
||||
|
||||
// QuotedPostIDIsNil applies the IsNil predicate on the "quoted_post_id" field.
|
||||
func QuotedPostIDIsNil() predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIsNull(FieldQuotedPostID))
|
||||
}
|
||||
|
||||
// QuotedPostIDNotNil applies the NotNil predicate on the "quoted_post_id" field.
|
||||
func QuotedPostIDNotNil() predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotNull(FieldQuotedPostID))
|
||||
}
|
||||
|
||||
// LikeCountEQ applies the EQ predicate on the "like_count" field.
|
||||
func LikeCountEQ(v int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldLikeCount, v))
|
||||
}
|
||||
|
||||
// LikeCountNEQ applies the NEQ predicate on the "like_count" field.
|
||||
func LikeCountNEQ(v int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNEQ(FieldLikeCount, v))
|
||||
}
|
||||
|
||||
// LikeCountIn applies the In predicate on the "like_count" field.
|
||||
func LikeCountIn(vs ...int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIn(FieldLikeCount, vs...))
|
||||
}
|
||||
|
||||
// LikeCountNotIn applies the NotIn predicate on the "like_count" field.
|
||||
func LikeCountNotIn(vs ...int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotIn(FieldLikeCount, vs...))
|
||||
}
|
||||
|
||||
// LikeCountGT applies the GT predicate on the "like_count" field.
|
||||
func LikeCountGT(v int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGT(FieldLikeCount, v))
|
||||
}
|
||||
|
||||
// LikeCountGTE applies the GTE predicate on the "like_count" field.
|
||||
func LikeCountGTE(v int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGTE(FieldLikeCount, v))
|
||||
}
|
||||
|
||||
// LikeCountLT applies the LT predicate on the "like_count" field.
|
||||
func LikeCountLT(v int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLT(FieldLikeCount, v))
|
||||
}
|
||||
|
||||
// LikeCountLTE applies the LTE predicate on the "like_count" field.
|
||||
func LikeCountLTE(v int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLTE(FieldLikeCount, v))
|
||||
}
|
||||
|
||||
// LikeCountIsNil applies the IsNil predicate on the "like_count" field.
|
||||
func LikeCountIsNil() predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIsNull(FieldLikeCount))
|
||||
}
|
||||
|
||||
// LikeCountNotNil applies the NotNil predicate on the "like_count" field.
|
||||
func LikeCountNotNil() predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotNull(FieldLikeCount))
|
||||
}
|
||||
|
||||
// CommentCountEQ applies the EQ predicate on the "comment_count" field.
|
||||
func CommentCountEQ(v int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldCommentCount, v))
|
||||
}
|
||||
|
||||
// CommentCountNEQ applies the NEQ predicate on the "comment_count" field.
|
||||
func CommentCountNEQ(v int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNEQ(FieldCommentCount, v))
|
||||
}
|
||||
|
||||
// CommentCountIn applies the In predicate on the "comment_count" field.
|
||||
func CommentCountIn(vs ...int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIn(FieldCommentCount, vs...))
|
||||
}
|
||||
|
||||
// CommentCountNotIn applies the NotIn predicate on the "comment_count" field.
|
||||
func CommentCountNotIn(vs ...int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotIn(FieldCommentCount, vs...))
|
||||
}
|
||||
|
||||
// CommentCountGT applies the GT predicate on the "comment_count" field.
|
||||
func CommentCountGT(v int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGT(FieldCommentCount, v))
|
||||
}
|
||||
|
||||
// CommentCountGTE applies the GTE predicate on the "comment_count" field.
|
||||
func CommentCountGTE(v int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGTE(FieldCommentCount, v))
|
||||
}
|
||||
|
||||
// CommentCountLT applies the LT predicate on the "comment_count" field.
|
||||
func CommentCountLT(v int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLT(FieldCommentCount, v))
|
||||
}
|
||||
|
||||
// CommentCountLTE applies the LTE predicate on the "comment_count" field.
|
||||
func CommentCountLTE(v int) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLTE(FieldCommentCount, v))
|
||||
}
|
||||
|
||||
// CommentCountIsNil applies the IsNil predicate on the "comment_count" field.
|
||||
func CommentCountIsNil() predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIsNull(FieldCommentCount))
|
||||
}
|
||||
|
||||
// CommentCountNotNil applies the NotNil predicate on the "comment_count" field.
|
||||
func CommentCountNotNil() predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotNull(FieldCommentCount))
|
||||
}
|
||||
|
||||
// PinnedEQ applies the EQ predicate on the "pinned" field.
|
||||
func PinnedEQ(v bool) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldPinned, v))
|
||||
}
|
||||
|
||||
// PinnedNEQ applies the NEQ predicate on the "pinned" field.
|
||||
func PinnedNEQ(v bool) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNEQ(FieldPinned, v))
|
||||
}
|
||||
|
||||
// PinnedIsNil applies the IsNil predicate on the "pinned" field.
|
||||
func PinnedIsNil() predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIsNull(FieldPinned))
|
||||
}
|
||||
|
||||
// PinnedNotNil applies the NotNil predicate on the "pinned" field.
|
||||
func PinnedNotNil() predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotNull(FieldPinned))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||||
func CreatedAtGT(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||||
func CreatedAtLT(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||||
func UpdatedAtNEQ(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||||
func UpdatedAtIn(vs ...time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||||
func UpdatedAtNotIn(vs ...time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||||
func UpdatedAtGT(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||||
func UpdatedAtGTE(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||||
func UpdatedAtLT(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||||
func UpdatedAtLTE(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
|
||||
func DeletedAtEQ(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
|
||||
func DeletedAtNEQ(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNEQ(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtIn applies the In predicate on the "deleted_at" field.
|
||||
func DeletedAtIn(vs ...time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIn(FieldDeletedAt, vs...))
|
||||
}
|
||||
|
||||
// DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
|
||||
func DeletedAtNotIn(vs ...time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotIn(FieldDeletedAt, vs...))
|
||||
}
|
||||
|
||||
// DeletedAtGT applies the GT predicate on the "deleted_at" field.
|
||||
func DeletedAtGT(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGT(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
|
||||
func DeletedAtGTE(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldGTE(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtLT applies the LT predicate on the "deleted_at" field.
|
||||
func DeletedAtLT(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLT(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
|
||||
func DeletedAtLTE(v time.Time) predicate.Posts {
|
||||
return predicate.Posts(sql.FieldLTE(FieldDeletedAt, v))
|
||||
}
|
||||
|
||||
// DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
|
||||
func DeletedAtIsNil() predicate.Posts {
|
||||
return predicate.Posts(sql.FieldIsNull(FieldDeletedAt))
|
||||
}
|
||||
|
||||
// DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
|
||||
func DeletedAtNotNil() predicate.Posts {
|
||||
return predicate.Posts(sql.FieldNotNull(FieldDeletedAt))
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.Posts) predicate.Posts {
|
||||
return predicate.Posts(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.Posts) predicate.Posts {
|
||||
return predicate.Posts(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.Posts) predicate.Posts {
|
||||
return predicate.Posts(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user