feat: 添加评价微服务,支持密封互评与订单状态联动
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package reviews
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the reviews type in the database.
|
||||
Label = "reviews"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldOrderID holds the string denoting the order_id field in the database.
|
||||
FieldOrderID = "order_id"
|
||||
// FieldFromUserID holds the string denoting the from_user_id field in the database.
|
||||
FieldFromUserID = "from_user_id"
|
||||
// FieldFromUserName holds the string denoting the from_user_name field in the database.
|
||||
FieldFromUserName = "from_user_name"
|
||||
// FieldFromUserAvatar holds the string denoting the from_user_avatar field in the database.
|
||||
FieldFromUserAvatar = "from_user_avatar"
|
||||
// FieldToUserID holds the string denoting the to_user_id field in the database.
|
||||
FieldToUserID = "to_user_id"
|
||||
// FieldRating holds the string denoting the rating field in the database.
|
||||
FieldRating = "rating"
|
||||
// FieldContent holds the string denoting the content field in the database.
|
||||
FieldContent = "content"
|
||||
// FieldSealed holds the string denoting the sealed field in the database.
|
||||
FieldSealed = "sealed"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// FieldUnsealedAt holds the string denoting the unsealed_at field in the database.
|
||||
FieldUnsealedAt = "unsealed_at"
|
||||
// Table holds the table name of the reviews in the database.
|
||||
Table = "reviews"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for reviews fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldOrderID,
|
||||
FieldFromUserID,
|
||||
FieldFromUserName,
|
||||
FieldFromUserAvatar,
|
||||
FieldToUserID,
|
||||
FieldRating,
|
||||
FieldContent,
|
||||
FieldSealed,
|
||||
FieldCreatedAt,
|
||||
FieldUnsealedAt,
|
||||
}
|
||||
|
||||
// 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 (
|
||||
// FromUserNameValidator is a validator for the "from_user_name" field. It is called by the builders before save.
|
||||
FromUserNameValidator func(string) error
|
||||
// DefaultFromUserAvatar holds the default value on creation for the "from_user_avatar" field.
|
||||
DefaultFromUserAvatar string
|
||||
// DefaultContent holds the default value on creation for the "content" field.
|
||||
DefaultContent string
|
||||
// DefaultSealed holds the default value on creation for the "sealed" field.
|
||||
DefaultSealed bool
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() time.Time
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the Reviews 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()
|
||||
}
|
||||
|
||||
// ByOrderID orders the results by the order_id field.
|
||||
func ByOrderID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOrderID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFromUserID orders the results by the from_user_id field.
|
||||
func ByFromUserID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFromUserID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFromUserName orders the results by the from_user_name field.
|
||||
func ByFromUserName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFromUserName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFromUserAvatar orders the results by the from_user_avatar field.
|
||||
func ByFromUserAvatar(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFromUserAvatar, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByToUserID orders the results by the to_user_id field.
|
||||
func ByToUserID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldToUserID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRating orders the results by the rating field.
|
||||
func ByRating(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRating, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByContent orders the results by the content field.
|
||||
func ByContent(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldContent, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySealed orders the results by the sealed field.
|
||||
func BySealed(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSealed, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUnsealedAt orders the results by the unsealed_at field.
|
||||
func ByUnsealedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUnsealedAt, opts...).ToFunc()
|
||||
}
|
||||
@@ -0,0 +1,595 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package reviews
|
||||
|
||||
import (
|
||||
"juwan-backend/app/review/rpc/internal/models/predicate"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// OrderID applies equality check predicate on the "order_id" field. It's identical to OrderIDEQ.
|
||||
func OrderID(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldOrderID, v))
|
||||
}
|
||||
|
||||
// FromUserID applies equality check predicate on the "from_user_id" field. It's identical to FromUserIDEQ.
|
||||
func FromUserID(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldFromUserID, v))
|
||||
}
|
||||
|
||||
// FromUserName applies equality check predicate on the "from_user_name" field. It's identical to FromUserNameEQ.
|
||||
func FromUserName(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldFromUserName, v))
|
||||
}
|
||||
|
||||
// FromUserAvatar applies equality check predicate on the "from_user_avatar" field. It's identical to FromUserAvatarEQ.
|
||||
func FromUserAvatar(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldFromUserAvatar, v))
|
||||
}
|
||||
|
||||
// ToUserID applies equality check predicate on the "to_user_id" field. It's identical to ToUserIDEQ.
|
||||
func ToUserID(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldToUserID, v))
|
||||
}
|
||||
|
||||
// Rating applies equality check predicate on the "rating" field. It's identical to RatingEQ.
|
||||
func Rating(v int16) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldRating, v))
|
||||
}
|
||||
|
||||
// Content applies equality check predicate on the "content" field. It's identical to ContentEQ.
|
||||
func Content(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldContent, v))
|
||||
}
|
||||
|
||||
// Sealed applies equality check predicate on the "sealed" field. It's identical to SealedEQ.
|
||||
func Sealed(v bool) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldSealed, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UnsealedAt applies equality check predicate on the "unsealed_at" field. It's identical to UnsealedAtEQ.
|
||||
func UnsealedAt(v time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldUnsealedAt, v))
|
||||
}
|
||||
|
||||
// OrderIDEQ applies the EQ predicate on the "order_id" field.
|
||||
func OrderIDEQ(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldOrderID, v))
|
||||
}
|
||||
|
||||
// OrderIDNEQ applies the NEQ predicate on the "order_id" field.
|
||||
func OrderIDNEQ(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNEQ(FieldOrderID, v))
|
||||
}
|
||||
|
||||
// OrderIDIn applies the In predicate on the "order_id" field.
|
||||
func OrderIDIn(vs ...int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldIn(FieldOrderID, vs...))
|
||||
}
|
||||
|
||||
// OrderIDNotIn applies the NotIn predicate on the "order_id" field.
|
||||
func OrderIDNotIn(vs ...int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNotIn(FieldOrderID, vs...))
|
||||
}
|
||||
|
||||
// OrderIDGT applies the GT predicate on the "order_id" field.
|
||||
func OrderIDGT(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGT(FieldOrderID, v))
|
||||
}
|
||||
|
||||
// OrderIDGTE applies the GTE predicate on the "order_id" field.
|
||||
func OrderIDGTE(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGTE(FieldOrderID, v))
|
||||
}
|
||||
|
||||
// OrderIDLT applies the LT predicate on the "order_id" field.
|
||||
func OrderIDLT(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLT(FieldOrderID, v))
|
||||
}
|
||||
|
||||
// OrderIDLTE applies the LTE predicate on the "order_id" field.
|
||||
func OrderIDLTE(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLTE(FieldOrderID, v))
|
||||
}
|
||||
|
||||
// FromUserIDEQ applies the EQ predicate on the "from_user_id" field.
|
||||
func FromUserIDEQ(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldFromUserID, v))
|
||||
}
|
||||
|
||||
// FromUserIDNEQ applies the NEQ predicate on the "from_user_id" field.
|
||||
func FromUserIDNEQ(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNEQ(FieldFromUserID, v))
|
||||
}
|
||||
|
||||
// FromUserIDIn applies the In predicate on the "from_user_id" field.
|
||||
func FromUserIDIn(vs ...int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldIn(FieldFromUserID, vs...))
|
||||
}
|
||||
|
||||
// FromUserIDNotIn applies the NotIn predicate on the "from_user_id" field.
|
||||
func FromUserIDNotIn(vs ...int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNotIn(FieldFromUserID, vs...))
|
||||
}
|
||||
|
||||
// FromUserIDGT applies the GT predicate on the "from_user_id" field.
|
||||
func FromUserIDGT(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGT(FieldFromUserID, v))
|
||||
}
|
||||
|
||||
// FromUserIDGTE applies the GTE predicate on the "from_user_id" field.
|
||||
func FromUserIDGTE(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGTE(FieldFromUserID, v))
|
||||
}
|
||||
|
||||
// FromUserIDLT applies the LT predicate on the "from_user_id" field.
|
||||
func FromUserIDLT(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLT(FieldFromUserID, v))
|
||||
}
|
||||
|
||||
// FromUserIDLTE applies the LTE predicate on the "from_user_id" field.
|
||||
func FromUserIDLTE(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLTE(FieldFromUserID, v))
|
||||
}
|
||||
|
||||
// FromUserNameEQ applies the EQ predicate on the "from_user_name" field.
|
||||
func FromUserNameEQ(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldFromUserName, v))
|
||||
}
|
||||
|
||||
// FromUserNameNEQ applies the NEQ predicate on the "from_user_name" field.
|
||||
func FromUserNameNEQ(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNEQ(FieldFromUserName, v))
|
||||
}
|
||||
|
||||
// FromUserNameIn applies the In predicate on the "from_user_name" field.
|
||||
func FromUserNameIn(vs ...string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldIn(FieldFromUserName, vs...))
|
||||
}
|
||||
|
||||
// FromUserNameNotIn applies the NotIn predicate on the "from_user_name" field.
|
||||
func FromUserNameNotIn(vs ...string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNotIn(FieldFromUserName, vs...))
|
||||
}
|
||||
|
||||
// FromUserNameGT applies the GT predicate on the "from_user_name" field.
|
||||
func FromUserNameGT(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGT(FieldFromUserName, v))
|
||||
}
|
||||
|
||||
// FromUserNameGTE applies the GTE predicate on the "from_user_name" field.
|
||||
func FromUserNameGTE(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGTE(FieldFromUserName, v))
|
||||
}
|
||||
|
||||
// FromUserNameLT applies the LT predicate on the "from_user_name" field.
|
||||
func FromUserNameLT(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLT(FieldFromUserName, v))
|
||||
}
|
||||
|
||||
// FromUserNameLTE applies the LTE predicate on the "from_user_name" field.
|
||||
func FromUserNameLTE(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLTE(FieldFromUserName, v))
|
||||
}
|
||||
|
||||
// FromUserNameContains applies the Contains predicate on the "from_user_name" field.
|
||||
func FromUserNameContains(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldContains(FieldFromUserName, v))
|
||||
}
|
||||
|
||||
// FromUserNameHasPrefix applies the HasPrefix predicate on the "from_user_name" field.
|
||||
func FromUserNameHasPrefix(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldHasPrefix(FieldFromUserName, v))
|
||||
}
|
||||
|
||||
// FromUserNameHasSuffix applies the HasSuffix predicate on the "from_user_name" field.
|
||||
func FromUserNameHasSuffix(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldHasSuffix(FieldFromUserName, v))
|
||||
}
|
||||
|
||||
// FromUserNameEqualFold applies the EqualFold predicate on the "from_user_name" field.
|
||||
func FromUserNameEqualFold(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEqualFold(FieldFromUserName, v))
|
||||
}
|
||||
|
||||
// FromUserNameContainsFold applies the ContainsFold predicate on the "from_user_name" field.
|
||||
func FromUserNameContainsFold(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldContainsFold(FieldFromUserName, v))
|
||||
}
|
||||
|
||||
// FromUserAvatarEQ applies the EQ predicate on the "from_user_avatar" field.
|
||||
func FromUserAvatarEQ(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldFromUserAvatar, v))
|
||||
}
|
||||
|
||||
// FromUserAvatarNEQ applies the NEQ predicate on the "from_user_avatar" field.
|
||||
func FromUserAvatarNEQ(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNEQ(FieldFromUserAvatar, v))
|
||||
}
|
||||
|
||||
// FromUserAvatarIn applies the In predicate on the "from_user_avatar" field.
|
||||
func FromUserAvatarIn(vs ...string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldIn(FieldFromUserAvatar, vs...))
|
||||
}
|
||||
|
||||
// FromUserAvatarNotIn applies the NotIn predicate on the "from_user_avatar" field.
|
||||
func FromUserAvatarNotIn(vs ...string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNotIn(FieldFromUserAvatar, vs...))
|
||||
}
|
||||
|
||||
// FromUserAvatarGT applies the GT predicate on the "from_user_avatar" field.
|
||||
func FromUserAvatarGT(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGT(FieldFromUserAvatar, v))
|
||||
}
|
||||
|
||||
// FromUserAvatarGTE applies the GTE predicate on the "from_user_avatar" field.
|
||||
func FromUserAvatarGTE(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGTE(FieldFromUserAvatar, v))
|
||||
}
|
||||
|
||||
// FromUserAvatarLT applies the LT predicate on the "from_user_avatar" field.
|
||||
func FromUserAvatarLT(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLT(FieldFromUserAvatar, v))
|
||||
}
|
||||
|
||||
// FromUserAvatarLTE applies the LTE predicate on the "from_user_avatar" field.
|
||||
func FromUserAvatarLTE(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLTE(FieldFromUserAvatar, v))
|
||||
}
|
||||
|
||||
// FromUserAvatarContains applies the Contains predicate on the "from_user_avatar" field.
|
||||
func FromUserAvatarContains(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldContains(FieldFromUserAvatar, v))
|
||||
}
|
||||
|
||||
// FromUserAvatarHasPrefix applies the HasPrefix predicate on the "from_user_avatar" field.
|
||||
func FromUserAvatarHasPrefix(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldHasPrefix(FieldFromUserAvatar, v))
|
||||
}
|
||||
|
||||
// FromUserAvatarHasSuffix applies the HasSuffix predicate on the "from_user_avatar" field.
|
||||
func FromUserAvatarHasSuffix(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldHasSuffix(FieldFromUserAvatar, v))
|
||||
}
|
||||
|
||||
// FromUserAvatarIsNil applies the IsNil predicate on the "from_user_avatar" field.
|
||||
func FromUserAvatarIsNil() predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldIsNull(FieldFromUserAvatar))
|
||||
}
|
||||
|
||||
// FromUserAvatarNotNil applies the NotNil predicate on the "from_user_avatar" field.
|
||||
func FromUserAvatarNotNil() predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNotNull(FieldFromUserAvatar))
|
||||
}
|
||||
|
||||
// FromUserAvatarEqualFold applies the EqualFold predicate on the "from_user_avatar" field.
|
||||
func FromUserAvatarEqualFold(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEqualFold(FieldFromUserAvatar, v))
|
||||
}
|
||||
|
||||
// FromUserAvatarContainsFold applies the ContainsFold predicate on the "from_user_avatar" field.
|
||||
func FromUserAvatarContainsFold(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldContainsFold(FieldFromUserAvatar, v))
|
||||
}
|
||||
|
||||
// ToUserIDEQ applies the EQ predicate on the "to_user_id" field.
|
||||
func ToUserIDEQ(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldToUserID, v))
|
||||
}
|
||||
|
||||
// ToUserIDNEQ applies the NEQ predicate on the "to_user_id" field.
|
||||
func ToUserIDNEQ(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNEQ(FieldToUserID, v))
|
||||
}
|
||||
|
||||
// ToUserIDIn applies the In predicate on the "to_user_id" field.
|
||||
func ToUserIDIn(vs ...int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldIn(FieldToUserID, vs...))
|
||||
}
|
||||
|
||||
// ToUserIDNotIn applies the NotIn predicate on the "to_user_id" field.
|
||||
func ToUserIDNotIn(vs ...int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNotIn(FieldToUserID, vs...))
|
||||
}
|
||||
|
||||
// ToUserIDGT applies the GT predicate on the "to_user_id" field.
|
||||
func ToUserIDGT(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGT(FieldToUserID, v))
|
||||
}
|
||||
|
||||
// ToUserIDGTE applies the GTE predicate on the "to_user_id" field.
|
||||
func ToUserIDGTE(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGTE(FieldToUserID, v))
|
||||
}
|
||||
|
||||
// ToUserIDLT applies the LT predicate on the "to_user_id" field.
|
||||
func ToUserIDLT(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLT(FieldToUserID, v))
|
||||
}
|
||||
|
||||
// ToUserIDLTE applies the LTE predicate on the "to_user_id" field.
|
||||
func ToUserIDLTE(v int64) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLTE(FieldToUserID, v))
|
||||
}
|
||||
|
||||
// RatingEQ applies the EQ predicate on the "rating" field.
|
||||
func RatingEQ(v int16) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldRating, v))
|
||||
}
|
||||
|
||||
// RatingNEQ applies the NEQ predicate on the "rating" field.
|
||||
func RatingNEQ(v int16) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNEQ(FieldRating, v))
|
||||
}
|
||||
|
||||
// RatingIn applies the In predicate on the "rating" field.
|
||||
func RatingIn(vs ...int16) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldIn(FieldRating, vs...))
|
||||
}
|
||||
|
||||
// RatingNotIn applies the NotIn predicate on the "rating" field.
|
||||
func RatingNotIn(vs ...int16) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNotIn(FieldRating, vs...))
|
||||
}
|
||||
|
||||
// RatingGT applies the GT predicate on the "rating" field.
|
||||
func RatingGT(v int16) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGT(FieldRating, v))
|
||||
}
|
||||
|
||||
// RatingGTE applies the GTE predicate on the "rating" field.
|
||||
func RatingGTE(v int16) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGTE(FieldRating, v))
|
||||
}
|
||||
|
||||
// RatingLT applies the LT predicate on the "rating" field.
|
||||
func RatingLT(v int16) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLT(FieldRating, v))
|
||||
}
|
||||
|
||||
// RatingLTE applies the LTE predicate on the "rating" field.
|
||||
func RatingLTE(v int16) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLTE(FieldRating, v))
|
||||
}
|
||||
|
||||
// ContentEQ applies the EQ predicate on the "content" field.
|
||||
func ContentEQ(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentNEQ applies the NEQ predicate on the "content" field.
|
||||
func ContentNEQ(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNEQ(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentIn applies the In predicate on the "content" field.
|
||||
func ContentIn(vs ...string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldIn(FieldContent, vs...))
|
||||
}
|
||||
|
||||
// ContentNotIn applies the NotIn predicate on the "content" field.
|
||||
func ContentNotIn(vs ...string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNotIn(FieldContent, vs...))
|
||||
}
|
||||
|
||||
// ContentGT applies the GT predicate on the "content" field.
|
||||
func ContentGT(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGT(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentGTE applies the GTE predicate on the "content" field.
|
||||
func ContentGTE(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGTE(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentLT applies the LT predicate on the "content" field.
|
||||
func ContentLT(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLT(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentLTE applies the LTE predicate on the "content" field.
|
||||
func ContentLTE(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLTE(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentContains applies the Contains predicate on the "content" field.
|
||||
func ContentContains(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldContains(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentHasPrefix applies the HasPrefix predicate on the "content" field.
|
||||
func ContentHasPrefix(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldHasPrefix(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentHasSuffix applies the HasSuffix predicate on the "content" field.
|
||||
func ContentHasSuffix(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldHasSuffix(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentIsNil applies the IsNil predicate on the "content" field.
|
||||
func ContentIsNil() predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldIsNull(FieldContent))
|
||||
}
|
||||
|
||||
// ContentNotNil applies the NotNil predicate on the "content" field.
|
||||
func ContentNotNil() predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNotNull(FieldContent))
|
||||
}
|
||||
|
||||
// ContentEqualFold applies the EqualFold predicate on the "content" field.
|
||||
func ContentEqualFold(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEqualFold(FieldContent, v))
|
||||
}
|
||||
|
||||
// ContentContainsFold applies the ContainsFold predicate on the "content" field.
|
||||
func ContentContainsFold(v string) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldContainsFold(FieldContent, v))
|
||||
}
|
||||
|
||||
// SealedEQ applies the EQ predicate on the "sealed" field.
|
||||
func SealedEQ(v bool) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldSealed, v))
|
||||
}
|
||||
|
||||
// SealedNEQ applies the NEQ predicate on the "sealed" field.
|
||||
func SealedNEQ(v bool) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNEQ(FieldSealed, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||||
func CreatedAtGT(v time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||||
func CreatedAtLT(v time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UnsealedAtEQ applies the EQ predicate on the "unsealed_at" field.
|
||||
func UnsealedAtEQ(v time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldEQ(FieldUnsealedAt, v))
|
||||
}
|
||||
|
||||
// UnsealedAtNEQ applies the NEQ predicate on the "unsealed_at" field.
|
||||
func UnsealedAtNEQ(v time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNEQ(FieldUnsealedAt, v))
|
||||
}
|
||||
|
||||
// UnsealedAtIn applies the In predicate on the "unsealed_at" field.
|
||||
func UnsealedAtIn(vs ...time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldIn(FieldUnsealedAt, vs...))
|
||||
}
|
||||
|
||||
// UnsealedAtNotIn applies the NotIn predicate on the "unsealed_at" field.
|
||||
func UnsealedAtNotIn(vs ...time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNotIn(FieldUnsealedAt, vs...))
|
||||
}
|
||||
|
||||
// UnsealedAtGT applies the GT predicate on the "unsealed_at" field.
|
||||
func UnsealedAtGT(v time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGT(FieldUnsealedAt, v))
|
||||
}
|
||||
|
||||
// UnsealedAtGTE applies the GTE predicate on the "unsealed_at" field.
|
||||
func UnsealedAtGTE(v time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldGTE(FieldUnsealedAt, v))
|
||||
}
|
||||
|
||||
// UnsealedAtLT applies the LT predicate on the "unsealed_at" field.
|
||||
func UnsealedAtLT(v time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLT(FieldUnsealedAt, v))
|
||||
}
|
||||
|
||||
// UnsealedAtLTE applies the LTE predicate on the "unsealed_at" field.
|
||||
func UnsealedAtLTE(v time.Time) predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldLTE(FieldUnsealedAt, v))
|
||||
}
|
||||
|
||||
// UnsealedAtIsNil applies the IsNil predicate on the "unsealed_at" field.
|
||||
func UnsealedAtIsNil() predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldIsNull(FieldUnsealedAt))
|
||||
}
|
||||
|
||||
// UnsealedAtNotNil applies the NotNil predicate on the "unsealed_at" field.
|
||||
func UnsealedAtNotNil() predicate.Reviews {
|
||||
return predicate.Reviews(sql.FieldNotNull(FieldUnsealedAt))
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.Reviews) predicate.Reviews {
|
||||
return predicate.Reviews(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.Reviews) predicate.Reviews {
|
||||
return predicate.Reviews(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.Reviews) predicate.Reviews {
|
||||
return predicate.Reviews(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user