fix comment system
This commit is contained in:
72
ent/ma/ma.go
72
ent/ma/ma.go
@ -34,10 +34,28 @@ const (
|
||||
FieldCid = "cid"
|
||||
// FieldURI holds the string denoting the uri field in the database.
|
||||
FieldURI = "uri"
|
||||
// FieldCidRoot holds the string denoting the cid_root field in the database.
|
||||
FieldCidRoot = "cid_root"
|
||||
// FieldURIRoot holds the string denoting the uri_root field in the database.
|
||||
FieldURIRoot = "uri_root"
|
||||
// FieldRoot holds the string denoting the root field in the database.
|
||||
FieldRoot = "root"
|
||||
// FieldRkey holds the string denoting the rkey field in the database.
|
||||
FieldRkey = "rkey"
|
||||
// FieldBskyURL holds the string denoting the bsky_url field in the database.
|
||||
FieldBskyURL = "bsky_url"
|
||||
// FieldComment holds the string denoting the comment field in the database.
|
||||
FieldComment = "comment"
|
||||
// FieldBlog holds the string denoting the blog field in the database.
|
||||
FieldBlog = "blog"
|
||||
// FieldBlogURL holds the string denoting the blog_url field in the database.
|
||||
FieldBlogURL = "blog_url"
|
||||
// FieldDomain holds the string denoting the domain field in the database.
|
||||
FieldDomain = "domain"
|
||||
// FieldHost holds the string denoting the host field in the database.
|
||||
FieldHost = "host"
|
||||
// FieldFeed holds the string denoting the feed field in the database.
|
||||
FieldFeed = "feed"
|
||||
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
|
||||
FieldUpdatedAt = "updated_at"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
@ -68,8 +86,17 @@ var Columns = []string{
|
||||
FieldAvatar,
|
||||
FieldCid,
|
||||
FieldURI,
|
||||
FieldCidRoot,
|
||||
FieldURIRoot,
|
||||
FieldRoot,
|
||||
FieldRkey,
|
||||
FieldBskyURL,
|
||||
FieldComment,
|
||||
FieldBlog,
|
||||
FieldBlogURL,
|
||||
FieldDomain,
|
||||
FieldHost,
|
||||
FieldFeed,
|
||||
FieldUpdatedAt,
|
||||
FieldCreatedAt,
|
||||
}
|
||||
@ -162,6 +189,21 @@ func ByURI(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldURI, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCidRoot orders the results by the cid_root field.
|
||||
func ByCidRoot(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCidRoot, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByURIRoot orders the results by the uri_root field.
|
||||
func ByURIRoot(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldURIRoot, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRoot orders the results by the root field.
|
||||
func ByRoot(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRoot, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRkey orders the results by the rkey field.
|
||||
func ByRkey(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRkey, opts...).ToFunc()
|
||||
@ -172,6 +214,36 @@ func ByBskyURL(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBskyURL, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByComment orders the results by the comment field.
|
||||
func ByComment(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldComment, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBlog orders the results by the blog field.
|
||||
func ByBlog(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBlog, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBlogURL orders the results by the blog_url field.
|
||||
func ByBlogURL(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBlogURL, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDomain orders the results by the domain field.
|
||||
func ByDomain(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDomain, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByHost orders the results by the host field.
|
||||
func ByHost(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldHost, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFeed orders the results by the feed field.
|
||||
func ByFeed(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFeed, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUpdatedAt orders the results by the updated_at field.
|
||||
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
||||
|
Reference in New Issue
Block a user