post

package
v0.0.0-...-a68589b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the post type in the database.
	Label = "post"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// 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"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// FieldCategoryID holds the string denoting the category_id field in the database.
	FieldCategoryID = "category_id"
	// 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"
	// FieldReadPermission holds the string denoting the read_permission field in the database.
	FieldReadPermission = "read_permission"
	// FieldReadPermissionPoints holds the string denoting the read_permission_points field in the database.
	FieldReadPermissionPoints = "read_permission_points"
	// FieldViewCount holds the string denoting the view_count field in the database.
	FieldViewCount = "view_count"
	// FieldLikeCount holds the string denoting the like_count field in the database.
	FieldLikeCount = "like_count"
	// FieldDislikeCount holds the string denoting the dislike_count field in the database.
	FieldDislikeCount = "dislike_count"
	// FieldFavoriteCount holds the string denoting the favorite_count field in the database.
	FieldFavoriteCount = "favorite_count"
	// FieldIsEssence holds the string denoting the is_essence field in the database.
	FieldIsEssence = "is_essence"
	// FieldIsPinned holds the string denoting the is_pinned field in the database.
	FieldIsPinned = "is_pinned"
	// FieldPinScope holds the string denoting the pin_scope field in the database.
	FieldPinScope = "pin_scope"
	// FieldPublishIP holds the string denoting the publish_ip field in the database.
	FieldPublishIP = "publish_ip"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldLastEditedAt holds the string denoting the last_edited_at field in the database.
	FieldLastEditedAt = "last_edited_at"
	// Table holds the table name of the post in the database.
	Table = "posts"
)
View Source
const DefaultPinScope = PinScopeNone

PinScopeNone is the default value of the PinScope enum.

View Source
const DefaultReadPermission = ReadPermissionPublic

ReadPermissionPublic is the default value of the ReadPermission enum.

View Source
const DefaultStatus = StatusNormal

StatusNormal is the default value of the Status enum.

Variables

View Source
var (
	// 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
	// UserIDValidator is a validator for the "user_id" field. It is called by the builders before save.
	UserIDValidator func(int) error
	// CategoryIDValidator is a validator for the "category_id" field. It is called by the builders before save.
	CategoryIDValidator func(int) error
	// TitleValidator is a validator for the "title" field. It is called by the builders before save.
	TitleValidator func(string) error
	// ContentValidator is a validator for the "content" field. It is called by the builders before save.
	ContentValidator func(string) error
	// DefaultReadPermissionPoints holds the default value on creation for the "read_permission_points" field.
	DefaultReadPermissionPoints int
	// ReadPermissionPointsValidator is a validator for the "read_permission_points" field. It is called by the builders before save.
	ReadPermissionPointsValidator func(int) error
	// DefaultViewCount holds the default value on creation for the "view_count" field.
	DefaultViewCount int
	// ViewCountValidator is a validator for the "view_count" field. It is called by the builders before save.
	ViewCountValidator func(int) error
	// DefaultLikeCount holds the default value on creation for the "like_count" field.
	DefaultLikeCount int
	// LikeCountValidator is a validator for the "like_count" field. It is called by the builders before save.
	LikeCountValidator func(int) error
	// DefaultDislikeCount holds the default value on creation for the "dislike_count" field.
	DefaultDislikeCount int
	// DislikeCountValidator is a validator for the "dislike_count" field. It is called by the builders before save.
	DislikeCountValidator func(int) error
	// DefaultFavoriteCount holds the default value on creation for the "favorite_count" field.
	DefaultFavoriteCount int
	// FavoriteCountValidator is a validator for the "favorite_count" field. It is called by the builders before save.
	FavoriteCountValidator func(int) error
	// DefaultIsEssence holds the default value on creation for the "is_essence" field.
	DefaultIsEssence bool
	// DefaultIsPinned holds the default value on creation for the "is_pinned" field.
	DefaultIsPinned bool
)

Columns holds all SQL columns for post fields.

Functions

func And

func And(predicates ...predicate.Post) predicate.Post

And groups predicates with the AND operator between them.

func CategoryID

func CategoryID(v int) predicate.Post

CategoryID applies equality check predicate on the "category_id" field. It's identical to CategoryIDEQ.

func CategoryIDEQ

func CategoryIDEQ(v int) predicate.Post

CategoryIDEQ applies the EQ predicate on the "category_id" field.

func CategoryIDGT

func CategoryIDGT(v int) predicate.Post

CategoryIDGT applies the GT predicate on the "category_id" field.

func CategoryIDGTE

func CategoryIDGTE(v int) predicate.Post

CategoryIDGTE applies the GTE predicate on the "category_id" field.

func CategoryIDIn

func CategoryIDIn(vs ...int) predicate.Post

CategoryIDIn applies the In predicate on the "category_id" field.

func CategoryIDLT

func CategoryIDLT(v int) predicate.Post

CategoryIDLT applies the LT predicate on the "category_id" field.

func CategoryIDLTE

func CategoryIDLTE(v int) predicate.Post

CategoryIDLTE applies the LTE predicate on the "category_id" field.

func CategoryIDNEQ

func CategoryIDNEQ(v int) predicate.Post

CategoryIDNEQ applies the NEQ predicate on the "category_id" field.

func CategoryIDNotIn

func CategoryIDNotIn(vs ...int) predicate.Post

CategoryIDNotIn applies the NotIn predicate on the "category_id" field.

func Content

func Content(v string) predicate.Post

Content applies equality check predicate on the "content" field. It's identical to ContentEQ.

func ContentContains

func ContentContains(v string) predicate.Post

ContentContains applies the Contains predicate on the "content" field.

func ContentContainsFold

func ContentContainsFold(v string) predicate.Post

ContentContainsFold applies the ContainsFold predicate on the "content" field.

func ContentEQ

func ContentEQ(v string) predicate.Post

ContentEQ applies the EQ predicate on the "content" field.

func ContentEqualFold

func ContentEqualFold(v string) predicate.Post

ContentEqualFold applies the EqualFold predicate on the "content" field.

func ContentGT

func ContentGT(v string) predicate.Post

ContentGT applies the GT predicate on the "content" field.

func ContentGTE

func ContentGTE(v string) predicate.Post

ContentGTE applies the GTE predicate on the "content" field.

func ContentHasPrefix

func ContentHasPrefix(v string) predicate.Post

ContentHasPrefix applies the HasPrefix predicate on the "content" field.

func ContentHasSuffix

func ContentHasSuffix(v string) predicate.Post

ContentHasSuffix applies the HasSuffix predicate on the "content" field.

func ContentIn

func ContentIn(vs ...string) predicate.Post

ContentIn applies the In predicate on the "content" field.

func ContentLT

func ContentLT(v string) predicate.Post

ContentLT applies the LT predicate on the "content" field.

func ContentLTE

func ContentLTE(v string) predicate.Post

ContentLTE applies the LTE predicate on the "content" field.

func ContentNEQ

func ContentNEQ(v string) predicate.Post

ContentNEQ applies the NEQ predicate on the "content" field.

func ContentNotIn

func ContentNotIn(vs ...string) predicate.Post

ContentNotIn applies the NotIn predicate on the "content" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Post

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Post

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Post

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Post

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Post

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Post

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Post

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Post

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Post

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func DislikeCount

func DislikeCount(v int) predicate.Post

DislikeCount applies equality check predicate on the "dislike_count" field. It's identical to DislikeCountEQ.

func DislikeCountEQ

func DislikeCountEQ(v int) predicate.Post

DislikeCountEQ applies the EQ predicate on the "dislike_count" field.

func DislikeCountGT

func DislikeCountGT(v int) predicate.Post

DislikeCountGT applies the GT predicate on the "dislike_count" field.

func DislikeCountGTE

func DislikeCountGTE(v int) predicate.Post

DislikeCountGTE applies the GTE predicate on the "dislike_count" field.

func DislikeCountIn

func DislikeCountIn(vs ...int) predicate.Post

DislikeCountIn applies the In predicate on the "dislike_count" field.

func DislikeCountLT

func DislikeCountLT(v int) predicate.Post

DislikeCountLT applies the LT predicate on the "dislike_count" field.

func DislikeCountLTE

func DislikeCountLTE(v int) predicate.Post

DislikeCountLTE applies the LTE predicate on the "dislike_count" field.

func DislikeCountNEQ

func DislikeCountNEQ(v int) predicate.Post

DislikeCountNEQ applies the NEQ predicate on the "dislike_count" field.

func DislikeCountNotIn

func DislikeCountNotIn(vs ...int) predicate.Post

DislikeCountNotIn applies the NotIn predicate on the "dislike_count" field.

func FavoriteCount

func FavoriteCount(v int) predicate.Post

FavoriteCount applies equality check predicate on the "favorite_count" field. It's identical to FavoriteCountEQ.

func FavoriteCountEQ

func FavoriteCountEQ(v int) predicate.Post

FavoriteCountEQ applies the EQ predicate on the "favorite_count" field.

func FavoriteCountGT

func FavoriteCountGT(v int) predicate.Post

FavoriteCountGT applies the GT predicate on the "favorite_count" field.

func FavoriteCountGTE

func FavoriteCountGTE(v int) predicate.Post

FavoriteCountGTE applies the GTE predicate on the "favorite_count" field.

func FavoriteCountIn

func FavoriteCountIn(vs ...int) predicate.Post

FavoriteCountIn applies the In predicate on the "favorite_count" field.

func FavoriteCountLT

func FavoriteCountLT(v int) predicate.Post

FavoriteCountLT applies the LT predicate on the "favorite_count" field.

func FavoriteCountLTE

func FavoriteCountLTE(v int) predicate.Post

FavoriteCountLTE applies the LTE predicate on the "favorite_count" field.

func FavoriteCountNEQ

func FavoriteCountNEQ(v int) predicate.Post

FavoriteCountNEQ applies the NEQ predicate on the "favorite_count" field.

func FavoriteCountNotIn

func FavoriteCountNotIn(vs ...int) predicate.Post

FavoriteCountNotIn applies the NotIn predicate on the "favorite_count" field.

func ID

func ID(id int) predicate.Post

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Post

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Post

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Post

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Post

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Post

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Post

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Post

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Post

IDNotIn applies the NotIn predicate on the ID field.

func IsEssence

func IsEssence(v bool) predicate.Post

IsEssence applies equality check predicate on the "is_essence" field. It's identical to IsEssenceEQ.

func IsEssenceEQ

func IsEssenceEQ(v bool) predicate.Post

IsEssenceEQ applies the EQ predicate on the "is_essence" field.

func IsEssenceNEQ

func IsEssenceNEQ(v bool) predicate.Post

IsEssenceNEQ applies the NEQ predicate on the "is_essence" field.

func IsPinned

func IsPinned(v bool) predicate.Post

IsPinned applies equality check predicate on the "is_pinned" field. It's identical to IsPinnedEQ.

func IsPinnedEQ

func IsPinnedEQ(v bool) predicate.Post

IsPinnedEQ applies the EQ predicate on the "is_pinned" field.

func IsPinnedNEQ

func IsPinnedNEQ(v bool) predicate.Post

IsPinnedNEQ applies the NEQ predicate on the "is_pinned" field.

func LastEditedAt

func LastEditedAt(v time.Time) predicate.Post

LastEditedAt applies equality check predicate on the "last_edited_at" field. It's identical to LastEditedAtEQ.

func LastEditedAtEQ

func LastEditedAtEQ(v time.Time) predicate.Post

LastEditedAtEQ applies the EQ predicate on the "last_edited_at" field.

func LastEditedAtGT

func LastEditedAtGT(v time.Time) predicate.Post

LastEditedAtGT applies the GT predicate on the "last_edited_at" field.

func LastEditedAtGTE

func LastEditedAtGTE(v time.Time) predicate.Post

LastEditedAtGTE applies the GTE predicate on the "last_edited_at" field.

func LastEditedAtIn

func LastEditedAtIn(vs ...time.Time) predicate.Post

LastEditedAtIn applies the In predicate on the "last_edited_at" field.

func LastEditedAtIsNil

func LastEditedAtIsNil() predicate.Post

LastEditedAtIsNil applies the IsNil predicate on the "last_edited_at" field.

func LastEditedAtLT

func LastEditedAtLT(v time.Time) predicate.Post

LastEditedAtLT applies the LT predicate on the "last_edited_at" field.

func LastEditedAtLTE

func LastEditedAtLTE(v time.Time) predicate.Post

LastEditedAtLTE applies the LTE predicate on the "last_edited_at" field.

func LastEditedAtNEQ

func LastEditedAtNEQ(v time.Time) predicate.Post

LastEditedAtNEQ applies the NEQ predicate on the "last_edited_at" field.

func LastEditedAtNotIn

func LastEditedAtNotIn(vs ...time.Time) predicate.Post

LastEditedAtNotIn applies the NotIn predicate on the "last_edited_at" field.

func LastEditedAtNotNil

func LastEditedAtNotNil() predicate.Post

LastEditedAtNotNil applies the NotNil predicate on the "last_edited_at" field.

func LikeCount

func LikeCount(v int) predicate.Post

LikeCount applies equality check predicate on the "like_count" field. It's identical to LikeCountEQ.

func LikeCountEQ

func LikeCountEQ(v int) predicate.Post

LikeCountEQ applies the EQ predicate on the "like_count" field.

func LikeCountGT

func LikeCountGT(v int) predicate.Post

LikeCountGT applies the GT predicate on the "like_count" field.

func LikeCountGTE

func LikeCountGTE(v int) predicate.Post

LikeCountGTE applies the GTE predicate on the "like_count" field.

func LikeCountIn

func LikeCountIn(vs ...int) predicate.Post

LikeCountIn applies the In predicate on the "like_count" field.

func LikeCountLT

func LikeCountLT(v int) predicate.Post

LikeCountLT applies the LT predicate on the "like_count" field.

func LikeCountLTE

func LikeCountLTE(v int) predicate.Post

LikeCountLTE applies the LTE predicate on the "like_count" field.

func LikeCountNEQ

func LikeCountNEQ(v int) predicate.Post

LikeCountNEQ applies the NEQ predicate on the "like_count" field.

func LikeCountNotIn

func LikeCountNotIn(vs ...int) predicate.Post

LikeCountNotIn applies the NotIn predicate on the "like_count" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Post) predicate.Post

Or groups predicates with the OR operator between them.

func PinScopeEQ

func PinScopeEQ(v PinScope) predicate.Post

PinScopeEQ applies the EQ predicate on the "pin_scope" field.

func PinScopeIn

func PinScopeIn(vs ...PinScope) predicate.Post

PinScopeIn applies the In predicate on the "pin_scope" field.

func PinScopeNEQ

func PinScopeNEQ(v PinScope) predicate.Post

PinScopeNEQ applies the NEQ predicate on the "pin_scope" field.

func PinScopeNotIn

func PinScopeNotIn(vs ...PinScope) predicate.Post

PinScopeNotIn applies the NotIn predicate on the "pin_scope" field.

func PinScopeValidator

func PinScopeValidator(ps PinScope) error

PinScopeValidator is a validator for the "pin_scope" field enum values. It is called by the builders before save.

func PublishIP

func PublishIP(v string) predicate.Post

PublishIP applies equality check predicate on the "publish_ip" field. It's identical to PublishIPEQ.

func PublishIPContains

func PublishIPContains(v string) predicate.Post

PublishIPContains applies the Contains predicate on the "publish_ip" field.

func PublishIPContainsFold

func PublishIPContainsFold(v string) predicate.Post

PublishIPContainsFold applies the ContainsFold predicate on the "publish_ip" field.

func PublishIPEQ

func PublishIPEQ(v string) predicate.Post

PublishIPEQ applies the EQ predicate on the "publish_ip" field.

func PublishIPEqualFold

func PublishIPEqualFold(v string) predicate.Post

PublishIPEqualFold applies the EqualFold predicate on the "publish_ip" field.

func PublishIPGT

func PublishIPGT(v string) predicate.Post

PublishIPGT applies the GT predicate on the "publish_ip" field.

func PublishIPGTE

func PublishIPGTE(v string) predicate.Post

PublishIPGTE applies the GTE predicate on the "publish_ip" field.

func PublishIPHasPrefix

func PublishIPHasPrefix(v string) predicate.Post

PublishIPHasPrefix applies the HasPrefix predicate on the "publish_ip" field.

func PublishIPHasSuffix

func PublishIPHasSuffix(v string) predicate.Post

PublishIPHasSuffix applies the HasSuffix predicate on the "publish_ip" field.

func PublishIPIn

func PublishIPIn(vs ...string) predicate.Post

PublishIPIn applies the In predicate on the "publish_ip" field.

func PublishIPIsNil

func PublishIPIsNil() predicate.Post

PublishIPIsNil applies the IsNil predicate on the "publish_ip" field.

func PublishIPLT

func PublishIPLT(v string) predicate.Post

PublishIPLT applies the LT predicate on the "publish_ip" field.

func PublishIPLTE

func PublishIPLTE(v string) predicate.Post

PublishIPLTE applies the LTE predicate on the "publish_ip" field.

func PublishIPNEQ

func PublishIPNEQ(v string) predicate.Post

PublishIPNEQ applies the NEQ predicate on the "publish_ip" field.

func PublishIPNotIn

func PublishIPNotIn(vs ...string) predicate.Post

PublishIPNotIn applies the NotIn predicate on the "publish_ip" field.

func PublishIPNotNil

func PublishIPNotNil() predicate.Post

PublishIPNotNil applies the NotNil predicate on the "publish_ip" field.

func ReadPermissionEQ

func ReadPermissionEQ(v ReadPermission) predicate.Post

ReadPermissionEQ applies the EQ predicate on the "read_permission" field.

func ReadPermissionIn

func ReadPermissionIn(vs ...ReadPermission) predicate.Post

ReadPermissionIn applies the In predicate on the "read_permission" field.

func ReadPermissionNEQ

func ReadPermissionNEQ(v ReadPermission) predicate.Post

ReadPermissionNEQ applies the NEQ predicate on the "read_permission" field.

func ReadPermissionNotIn

func ReadPermissionNotIn(vs ...ReadPermission) predicate.Post

ReadPermissionNotIn applies the NotIn predicate on the "read_permission" field.

func ReadPermissionPoints

func ReadPermissionPoints(v int) predicate.Post

ReadPermissionPoints applies equality check predicate on the "read_permission_points" field. It's identical to ReadPermissionPointsEQ.

func ReadPermissionPointsEQ

func ReadPermissionPointsEQ(v int) predicate.Post

ReadPermissionPointsEQ applies the EQ predicate on the "read_permission_points" field.

func ReadPermissionPointsGT

func ReadPermissionPointsGT(v int) predicate.Post

ReadPermissionPointsGT applies the GT predicate on the "read_permission_points" field.

func ReadPermissionPointsGTE

func ReadPermissionPointsGTE(v int) predicate.Post

ReadPermissionPointsGTE applies the GTE predicate on the "read_permission_points" field.

func ReadPermissionPointsIn

func ReadPermissionPointsIn(vs ...int) predicate.Post

ReadPermissionPointsIn applies the In predicate on the "read_permission_points" field.

func ReadPermissionPointsLT

func ReadPermissionPointsLT(v int) predicate.Post

ReadPermissionPointsLT applies the LT predicate on the "read_permission_points" field.

func ReadPermissionPointsLTE

func ReadPermissionPointsLTE(v int) predicate.Post

ReadPermissionPointsLTE applies the LTE predicate on the "read_permission_points" field.

func ReadPermissionPointsNEQ

func ReadPermissionPointsNEQ(v int) predicate.Post

ReadPermissionPointsNEQ applies the NEQ predicate on the "read_permission_points" field.

func ReadPermissionPointsNotIn

func ReadPermissionPointsNotIn(vs ...int) predicate.Post

ReadPermissionPointsNotIn applies the NotIn predicate on the "read_permission_points" field.

func ReadPermissionValidator

func ReadPermissionValidator(rp ReadPermission) error

ReadPermissionValidator is a validator for the "read_permission" field enum values. It is called by the builders before save.

func StatusEQ

func StatusEQ(v Status) predicate.Post

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...Status) predicate.Post

StatusIn applies the In predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v Status) predicate.Post

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...Status) predicate.Post

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusValidator

func StatusValidator(s Status) error

StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.

func Title

func Title(v string) predicate.Post

Title applies equality check predicate on the "title" field. It's identical to TitleEQ.

func TitleContains

func TitleContains(v string) predicate.Post

TitleContains applies the Contains predicate on the "title" field.

func TitleContainsFold

func TitleContainsFold(v string) predicate.Post

TitleContainsFold applies the ContainsFold predicate on the "title" field.

func TitleEQ

func TitleEQ(v string) predicate.Post

TitleEQ applies the EQ predicate on the "title" field.

func TitleEqualFold

func TitleEqualFold(v string) predicate.Post

TitleEqualFold applies the EqualFold predicate on the "title" field.

func TitleGT

func TitleGT(v string) predicate.Post

TitleGT applies the GT predicate on the "title" field.

func TitleGTE

func TitleGTE(v string) predicate.Post

TitleGTE applies the GTE predicate on the "title" field.

func TitleHasPrefix

func TitleHasPrefix(v string) predicate.Post

TitleHasPrefix applies the HasPrefix predicate on the "title" field.

func TitleHasSuffix

func TitleHasSuffix(v string) predicate.Post

TitleHasSuffix applies the HasSuffix predicate on the "title" field.

func TitleIn

func TitleIn(vs ...string) predicate.Post

TitleIn applies the In predicate on the "title" field.

func TitleLT

func TitleLT(v string) predicate.Post

TitleLT applies the LT predicate on the "title" field.

func TitleLTE

func TitleLTE(v string) predicate.Post

TitleLTE applies the LTE predicate on the "title" field.

func TitleNEQ

func TitleNEQ(v string) predicate.Post

TitleNEQ applies the NEQ predicate on the "title" field.

func TitleNotIn

func TitleNotIn(vs ...string) predicate.Post

TitleNotIn applies the NotIn predicate on the "title" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Post

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Post

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Post

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Post

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Post

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Post

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Post

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Post

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Post

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func UserID

func UserID(v int) predicate.Post

UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.

func UserIDEQ

func UserIDEQ(v int) predicate.Post

UserIDEQ applies the EQ predicate on the "user_id" field.

func UserIDGT

func UserIDGT(v int) predicate.Post

UserIDGT applies the GT predicate on the "user_id" field.

func UserIDGTE

func UserIDGTE(v int) predicate.Post

UserIDGTE applies the GTE predicate on the "user_id" field.

func UserIDIn

func UserIDIn(vs ...int) predicate.Post

UserIDIn applies the In predicate on the "user_id" field.

func UserIDLT

func UserIDLT(v int) predicate.Post

UserIDLT applies the LT predicate on the "user_id" field.

func UserIDLTE

func UserIDLTE(v int) predicate.Post

UserIDLTE applies the LTE predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v int) predicate.Post

UserIDNEQ applies the NEQ predicate on the "user_id" field.

func UserIDNotIn

func UserIDNotIn(vs ...int) predicate.Post

UserIDNotIn applies the NotIn predicate on the "user_id" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

func ViewCount

func ViewCount(v int) predicate.Post

ViewCount applies equality check predicate on the "view_count" field. It's identical to ViewCountEQ.

func ViewCountEQ

func ViewCountEQ(v int) predicate.Post

ViewCountEQ applies the EQ predicate on the "view_count" field.

func ViewCountGT

func ViewCountGT(v int) predicate.Post

ViewCountGT applies the GT predicate on the "view_count" field.

func ViewCountGTE

func ViewCountGTE(v int) predicate.Post

ViewCountGTE applies the GTE predicate on the "view_count" field.

func ViewCountIn

func ViewCountIn(vs ...int) predicate.Post

ViewCountIn applies the In predicate on the "view_count" field.

func ViewCountLT

func ViewCountLT(v int) predicate.Post

ViewCountLT applies the LT predicate on the "view_count" field.

func ViewCountLTE

func ViewCountLTE(v int) predicate.Post

ViewCountLTE applies the LTE predicate on the "view_count" field.

func ViewCountNEQ

func ViewCountNEQ(v int) predicate.Post

ViewCountNEQ applies the NEQ predicate on the "view_count" field.

func ViewCountNotIn

func ViewCountNotIn(vs ...int) predicate.Post

ViewCountNotIn applies the NotIn predicate on the "view_count" field.

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Post queries.

func ByCategoryID

func ByCategoryID(opts ...sql.OrderTermOption) OrderOption

ByCategoryID orders the results by the category_id field.

func ByContent

func ByContent(opts ...sql.OrderTermOption) OrderOption

ByContent orders the results by the content field.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByDislikeCount

func ByDislikeCount(opts ...sql.OrderTermOption) OrderOption

ByDislikeCount orders the results by the dislike_count field.

func ByFavoriteCount

func ByFavoriteCount(opts ...sql.OrderTermOption) OrderOption

ByFavoriteCount orders the results by the favorite_count field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByIsEssence

func ByIsEssence(opts ...sql.OrderTermOption) OrderOption

ByIsEssence orders the results by the is_essence field.

func ByIsPinned

func ByIsPinned(opts ...sql.OrderTermOption) OrderOption

ByIsPinned orders the results by the is_pinned field.

func ByLastEditedAt

func ByLastEditedAt(opts ...sql.OrderTermOption) OrderOption

ByLastEditedAt orders the results by the last_edited_at field.

func ByLikeCount

func ByLikeCount(opts ...sql.OrderTermOption) OrderOption

ByLikeCount orders the results by the like_count field.

func ByPinScope

func ByPinScope(opts ...sql.OrderTermOption) OrderOption

ByPinScope orders the results by the pin_scope field.

func ByPublishIP

func ByPublishIP(opts ...sql.OrderTermOption) OrderOption

ByPublishIP orders the results by the publish_ip field.

func ByReadPermission

func ByReadPermission(opts ...sql.OrderTermOption) OrderOption

ByReadPermission orders the results by the read_permission field.

func ByReadPermissionPoints

func ByReadPermissionPoints(opts ...sql.OrderTermOption) OrderOption

ByReadPermissionPoints orders the results by the read_permission_points field.

func ByStatus

func ByStatus(opts ...sql.OrderTermOption) OrderOption

ByStatus orders the results by the status field.

func ByTitle

func ByTitle(opts ...sql.OrderTermOption) OrderOption

ByTitle orders the results by the title field.

func ByUpdatedAt

func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption

ByUpdatedAt orders the results by the updated_at field.

func ByUserID

func ByUserID(opts ...sql.OrderTermOption) OrderOption

ByUserID orders the results by the user_id field.

func ByViewCount

func ByViewCount(opts ...sql.OrderTermOption) OrderOption

ByViewCount orders the results by the view_count field.

type PinScope

type PinScope string

PinScope defines the type for the "pin_scope" enum field.

const (
	PinScopeNone     PinScope = "None"
	PinScopeHome     PinScope = "Home"
	PinScopeCategory PinScope = "Category"
	PinScopeGlobal   PinScope = "Global"
)

PinScope values.

func (PinScope) String

func (ps PinScope) String() string

type ReadPermission

type ReadPermission string

ReadPermission defines the type for the "read_permission" enum field.

const (
	ReadPermissionPublic         ReadPermission = "public"
	ReadPermissionLoginRequired  ReadPermission = "login_required"
	ReadPermissionPointsRequired ReadPermission = "points_required"
)

ReadPermission values.

func (ReadPermission) String

func (rp ReadPermission) String() string

type Status

type Status string

Status defines the type for the "status" enum field.

const (
	StatusNormal  Status = "Normal"
	StatusLocked  Status = "Locked"
	StatusDraft   Status = "Draft"
	StatusPrivate Status = "Private"
	StatusBan     Status = "Ban"
)

Status values.

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL