post.go•25 kB
// Code generated by ent, DO NOT EDIT.
package post
import (
"fmt"
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/rs/xid"
)
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"
// FieldDeletedAt holds the string denoting the deleted_at field in the database.
FieldDeletedAt = "deleted_at"
// FieldIndexedAt holds the string denoting the indexed_at field in the database.
FieldIndexedAt = "indexed_at"
// FieldFirst holds the string denoting the first field in the database.
FieldFirst = "first"
// FieldTitle holds the string denoting the title field in the database.
FieldTitle = "title"
// FieldSlug holds the string denoting the slug field in the database.
FieldSlug = "slug"
// FieldPinned holds the string denoting the pinned field in the database.
FieldPinned = "pinned"
// FieldLastReplyAt holds the string denoting the last_reply_at field in the database.
FieldLastReplyAt = "last_reply_at"
// FieldRootPostID holds the string denoting the root_post_id field in the database.
FieldRootPostID = "root_post_id"
// FieldReplyToPostID holds the string denoting the reply_to_post_id field in the database.
FieldReplyToPostID = "reply_to_post_id"
// FieldBody holds the string denoting the body field in the database.
FieldBody = "body"
// FieldShort holds the string denoting the short field in the database.
FieldShort = "short"
// FieldMetadata holds the string denoting the metadata field in the database.
FieldMetadata = "metadata"
// FieldVisibility holds the string denoting the visibility field in the database.
FieldVisibility = "visibility"
// FieldAccountPosts holds the string denoting the account_posts field in the database.
FieldAccountPosts = "account_posts"
// FieldCategoryID holds the string denoting the category_id field in the database.
FieldCategoryID = "category_id"
// FieldLinkID holds the string denoting the link_id field in the database.
FieldLinkID = "link_id"
// EdgeAuthor holds the string denoting the author edge name in mutations.
EdgeAuthor = "author"
// EdgeCategory holds the string denoting the category edge name in mutations.
EdgeCategory = "category"
// EdgeTags holds the string denoting the tags edge name in mutations.
EdgeTags = "tags"
// EdgeRoot holds the string denoting the root edge name in mutations.
EdgeRoot = "root"
// EdgePosts holds the string denoting the posts edge name in mutations.
EdgePosts = "posts"
// EdgeReplyTo holds the string denoting the replyto edge name in mutations.
EdgeReplyTo = "replyTo"
// EdgeReplies holds the string denoting the replies edge name in mutations.
EdgeReplies = "replies"
// EdgeReacts holds the string denoting the reacts edge name in mutations.
EdgeReacts = "reacts"
// EdgeLikes holds the string denoting the likes edge name in mutations.
EdgeLikes = "likes"
// EdgeMentions holds the string denoting the mentions edge name in mutations.
EdgeMentions = "mentions"
// EdgeAssets holds the string denoting the assets edge name in mutations.
EdgeAssets = "assets"
// EdgeCollections holds the string denoting the collections edge name in mutations.
EdgeCollections = "collections"
// EdgeLink holds the string denoting the link edge name in mutations.
EdgeLink = "link"
// EdgeContentLinks holds the string denoting the content_links edge name in mutations.
EdgeContentLinks = "content_links"
// EdgeEvent holds the string denoting the event edge name in mutations.
EdgeEvent = "event"
// EdgePostReads holds the string denoting the post_reads edge name in mutations.
EdgePostReads = "post_reads"
// Table holds the table name of the post in the database.
Table = "posts"
// AuthorTable is the table that holds the author relation/edge.
AuthorTable = "posts"
// AuthorInverseTable is the table name for the Account entity.
// It exists in this package in order to avoid circular dependency with the "account" package.
AuthorInverseTable = "accounts"
// AuthorColumn is the table column denoting the author relation/edge.
AuthorColumn = "account_posts"
// CategoryTable is the table that holds the category relation/edge.
CategoryTable = "posts"
// CategoryInverseTable is the table name for the Category entity.
// It exists in this package in order to avoid circular dependency with the "category" package.
CategoryInverseTable = "categories"
// CategoryColumn is the table column denoting the category relation/edge.
CategoryColumn = "category_id"
// TagsTable is the table that holds the tags relation/edge. The primary key declared below.
TagsTable = "tag_posts"
// TagsInverseTable is the table name for the Tag entity.
// It exists in this package in order to avoid circular dependency with the "tag" package.
TagsInverseTable = "tags"
// RootTable is the table that holds the root relation/edge.
RootTable = "posts"
// RootColumn is the table column denoting the root relation/edge.
RootColumn = "root_post_id"
// PostsTable is the table that holds the posts relation/edge.
PostsTable = "posts"
// PostsColumn is the table column denoting the posts relation/edge.
PostsColumn = "root_post_id"
// ReplyToTable is the table that holds the replyTo relation/edge.
ReplyToTable = "posts"
// ReplyToColumn is the table column denoting the replyTo relation/edge.
ReplyToColumn = "reply_to_post_id"
// RepliesTable is the table that holds the replies relation/edge.
RepliesTable = "posts"
// RepliesColumn is the table column denoting the replies relation/edge.
RepliesColumn = "reply_to_post_id"
// ReactsTable is the table that holds the reacts relation/edge.
ReactsTable = "reacts"
// ReactsInverseTable is the table name for the React entity.
// It exists in this package in order to avoid circular dependency with the "react" package.
ReactsInverseTable = "reacts"
// ReactsColumn is the table column denoting the reacts relation/edge.
ReactsColumn = "post_id"
// LikesTable is the table that holds the likes relation/edge.
LikesTable = "like_posts"
// LikesInverseTable is the table name for the LikePost entity.
// It exists in this package in order to avoid circular dependency with the "likepost" package.
LikesInverseTable = "like_posts"
// LikesColumn is the table column denoting the likes relation/edge.
LikesColumn = "post_id"
// MentionsTable is the table that holds the mentions relation/edge.
MentionsTable = "mention_profiles"
// MentionsInverseTable is the table name for the MentionProfile entity.
// It exists in this package in order to avoid circular dependency with the "mentionprofile" package.
MentionsInverseTable = "mention_profiles"
// MentionsColumn is the table column denoting the mentions relation/edge.
MentionsColumn = "post_id"
// AssetsTable is the table that holds the assets relation/edge. The primary key declared below.
AssetsTable = "post_assets"
// AssetsInverseTable is the table name for the Asset entity.
// It exists in this package in order to avoid circular dependency with the "asset" package.
AssetsInverseTable = "assets"
// CollectionsTable is the table that holds the collections relation/edge. The primary key declared below.
CollectionsTable = "collection_posts"
// CollectionsInverseTable is the table name for the Collection entity.
// It exists in this package in order to avoid circular dependency with the "collection" package.
CollectionsInverseTable = "collections"
// LinkTable is the table that holds the link relation/edge.
LinkTable = "posts"
// LinkInverseTable is the table name for the Link entity.
// It exists in this package in order to avoid circular dependency with the "link" package.
LinkInverseTable = "links"
// LinkColumn is the table column denoting the link relation/edge.
LinkColumn = "link_id"
// ContentLinksTable is the table that holds the content_links relation/edge. The primary key declared below.
ContentLinksTable = "link_post_content_references"
// ContentLinksInverseTable is the table name for the Link entity.
// It exists in this package in order to avoid circular dependency with the "link" package.
ContentLinksInverseTable = "links"
// EventTable is the table that holds the event relation/edge.
EventTable = "events"
// EventInverseTable is the table name for the Event entity.
// It exists in this package in order to avoid circular dependency with the "event" package.
EventInverseTable = "events"
// EventColumn is the table column denoting the event relation/edge.
EventColumn = "post_event"
// PostReadsTable is the table that holds the post_reads relation/edge.
PostReadsTable = "post_reads"
// PostReadsInverseTable is the table name for the PostRead entity.
// It exists in this package in order to avoid circular dependency with the "postread" package.
PostReadsInverseTable = "post_reads"
// PostReadsColumn is the table column denoting the post_reads relation/edge.
PostReadsColumn = "root_post_id"
)
// Columns holds all SQL columns for post fields.
var Columns = []string{
FieldID,
FieldCreatedAt,
FieldUpdatedAt,
FieldDeletedAt,
FieldIndexedAt,
FieldFirst,
FieldTitle,
FieldSlug,
FieldPinned,
FieldLastReplyAt,
FieldRootPostID,
FieldReplyToPostID,
FieldBody,
FieldShort,
FieldMetadata,
FieldVisibility,
FieldAccountPosts,
FieldCategoryID,
FieldLinkID,
}
var (
// TagsPrimaryKey and TagsColumn2 are the table columns denoting the
// primary key for the tags relation (M2M).
TagsPrimaryKey = []string{"tag_id", "post_id"}
// AssetsPrimaryKey and AssetsColumn2 are the table columns denoting the
// primary key for the assets relation (M2M).
AssetsPrimaryKey = []string{"post_id", "asset_id"}
// CollectionsPrimaryKey and CollectionsColumn2 are the table columns denoting the
// primary key for the collections relation (M2M).
CollectionsPrimaryKey = []string{"collection_id", "post_id"}
// ContentLinksPrimaryKey and ContentLinksColumn2 are the table columns denoting the
// primary key for the content_links relation (M2M).
ContentLinksPrimaryKey = []string{"link_id", "post_id"}
)
// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
for i := range Columns {
if column == Columns[i] {
return true
}
}
return false
}
var (
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
DefaultCreatedAt func() time.Time
// DefaultPinned holds the default value on creation for the "pinned" field.
DefaultPinned bool
// DefaultID holds the default value on creation for the "id" field.
DefaultID func() xid.ID
// IDValidator is a validator for the "id" field. It is called by the builders before save.
IDValidator func(string) error
)
// Visibility defines the type for the "visibility" enum field.
type Visibility string
// VisibilityDraft is the default value of the Visibility enum.
const DefaultVisibility = VisibilityDraft
// Visibility values.
const (
VisibilityDraft Visibility = "draft"
VisibilityUnlisted Visibility = "unlisted"
VisibilityReview Visibility = "review"
VisibilityPublished Visibility = "published"
)
func (v Visibility) String() string {
return string(v)
}
// VisibilityValidator is a validator for the "visibility" field enum values. It is called by the builders before save.
func VisibilityValidator(v Visibility) error {
switch v {
case VisibilityDraft, VisibilityUnlisted, VisibilityReview, VisibilityPublished:
return nil
default:
return fmt.Errorf("post: invalid enum value for visibility field: %q", v)
}
}
// OrderOption defines the ordering options for the Post 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()
}
// 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()
}
// ByIndexedAt orders the results by the indexed_at field.
func ByIndexedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIndexedAt, opts...).ToFunc()
}
// ByFirst orders the results by the first field.
func ByFirst(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFirst, opts...).ToFunc()
}
// ByTitle orders the results by the title field.
func ByTitle(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTitle, opts...).ToFunc()
}
// BySlug orders the results by the slug field.
func BySlug(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSlug, opts...).ToFunc()
}
// ByPinned orders the results by the pinned field.
func ByPinned(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPinned, opts...).ToFunc()
}
// ByLastReplyAt orders the results by the last_reply_at field.
func ByLastReplyAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLastReplyAt, opts...).ToFunc()
}
// ByRootPostID orders the results by the root_post_id field.
func ByRootPostID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRootPostID, opts...).ToFunc()
}
// ByReplyToPostID orders the results by the reply_to_post_id field.
func ByReplyToPostID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldReplyToPostID, opts...).ToFunc()
}
// ByBody orders the results by the body field.
func ByBody(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBody, opts...).ToFunc()
}
// ByShort orders the results by the short field.
func ByShort(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldShort, opts...).ToFunc()
}
// ByVisibility orders the results by the visibility field.
func ByVisibility(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldVisibility, opts...).ToFunc()
}
// ByAccountPosts orders the results by the account_posts field.
func ByAccountPosts(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAccountPosts, opts...).ToFunc()
}
// ByCategoryID orders the results by the category_id field.
func ByCategoryID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCategoryID, opts...).ToFunc()
}
// ByLinkID orders the results by the link_id field.
func ByLinkID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLinkID, opts...).ToFunc()
}
// ByAuthorField orders the results by author field.
func ByAuthorField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newAuthorStep(), sql.OrderByField(field, opts...))
}
}
// ByCategoryField orders the results by category field.
func ByCategoryField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newCategoryStep(), sql.OrderByField(field, opts...))
}
}
// ByTagsCount orders the results by tags count.
func ByTagsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newTagsStep(), opts...)
}
}
// ByTags orders the results by tags terms.
func ByTags(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newTagsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByRootField orders the results by root field.
func ByRootField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newRootStep(), sql.OrderByField(field, opts...))
}
}
// ByPostsCount orders the results by posts count.
func ByPostsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newPostsStep(), opts...)
}
}
// ByPosts orders the results by posts terms.
func ByPosts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newPostsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByReplyToField orders the results by replyTo field.
func ByReplyToField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newReplyToStep(), sql.OrderByField(field, opts...))
}
}
// ByRepliesCount orders the results by replies count.
func ByRepliesCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newRepliesStep(), opts...)
}
}
// ByReplies orders the results by replies terms.
func ByReplies(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newRepliesStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByReactsCount orders the results by reacts count.
func ByReactsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newReactsStep(), opts...)
}
}
// ByReacts orders the results by reacts terms.
func ByReacts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newReactsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByLikesCount orders the results by likes count.
func ByLikesCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newLikesStep(), opts...)
}
}
// ByLikes orders the results by likes terms.
func ByLikes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newLikesStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByMentionsCount orders the results by mentions count.
func ByMentionsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newMentionsStep(), opts...)
}
}
// ByMentions orders the results by mentions terms.
func ByMentions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newMentionsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByAssetsCount orders the results by assets count.
func ByAssetsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newAssetsStep(), opts...)
}
}
// ByAssets orders the results by assets terms.
func ByAssets(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newAssetsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByCollectionsCount orders the results by collections count.
func ByCollectionsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newCollectionsStep(), opts...)
}
}
// ByCollections orders the results by collections terms.
func ByCollections(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newCollectionsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByLinkField orders the results by link field.
func ByLinkField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newLinkStep(), sql.OrderByField(field, opts...))
}
}
// ByContentLinksCount orders the results by content_links count.
func ByContentLinksCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newContentLinksStep(), opts...)
}
}
// ByContentLinks orders the results by content_links terms.
func ByContentLinks(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newContentLinksStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByEventCount orders the results by event count.
func ByEventCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newEventStep(), opts...)
}
}
// ByEvent orders the results by event terms.
func ByEvent(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newEventStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByPostReadsCount orders the results by post_reads count.
func ByPostReadsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newPostReadsStep(), opts...)
}
}
// ByPostReads orders the results by post_reads terms.
func ByPostReads(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newPostReadsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
func newAuthorStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(AuthorInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, AuthorTable, AuthorColumn),
)
}
func newCategoryStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(CategoryInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, CategoryTable, CategoryColumn),
)
}
func newTagsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(TagsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2M, true, TagsTable, TagsPrimaryKey...),
)
}
func newRootStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, RootTable, RootColumn),
)
}
func newPostsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, PostsTable, PostsColumn),
)
}
func newReplyToStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, ReplyToTable, ReplyToColumn),
)
}
func newRepliesStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(Table, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, RepliesTable, RepliesColumn),
)
}
func newReactsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(ReactsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, ReactsTable, ReactsColumn),
)
}
func newLikesStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(LikesInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, LikesTable, LikesColumn),
)
}
func newMentionsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(MentionsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, MentionsTable, MentionsColumn),
)
}
func newAssetsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(AssetsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2M, false, AssetsTable, AssetsPrimaryKey...),
)
}
func newCollectionsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(CollectionsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2M, true, CollectionsTable, CollectionsPrimaryKey...),
)
}
func newLinkStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(LinkInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, LinkTable, LinkColumn),
)
}
func newContentLinksStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(ContentLinksInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2M, true, ContentLinksTable, ContentLinksPrimaryKey...),
)
}
func newEventStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(EventInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, EventTable, EventColumn),
)
}
func newPostReadsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(PostReadsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, PostReadsTable, PostReadsColumn),
)
}