update migrate
This commit is contained in:
@ -4,6 +4,9 @@ package card
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -11,14 +14,24 @@ const (
|
||||
Label = "card"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldPassword holds the string denoting the password field in the database.
|
||||
FieldPassword = "password"
|
||||
// FieldCard holds the string denoting the card field in the database.
|
||||
FieldCard = "card"
|
||||
// FieldSkill holds the string denoting the skill field in the database.
|
||||
FieldSkill = "skill"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldToken holds the string denoting the token field in the database.
|
||||
FieldToken = "token"
|
||||
// FieldCp holds the string denoting the cp field in the database.
|
||||
FieldCp = "cp"
|
||||
// FieldURL holds the string denoting the url field in the database.
|
||||
FieldURL = "url"
|
||||
// FieldCount holds the string denoting the count field in the database.
|
||||
FieldCount = "count"
|
||||
// FieldAuthor holds the string denoting the author field in the database.
|
||||
FieldAuthor = "author"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// EdgeOwner holds the string denoting the owner edge name in mutations.
|
||||
@ -37,10 +50,15 @@ const (
|
||||
// Columns holds all SQL columns for card fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldPassword,
|
||||
FieldCard,
|
||||
FieldSkill,
|
||||
FieldStatus,
|
||||
FieldToken,
|
||||
FieldCp,
|
||||
FieldURL,
|
||||
FieldCount,
|
||||
FieldAuthor,
|
||||
FieldCreatedAt,
|
||||
}
|
||||
|
||||
@ -66,8 +84,12 @@ func ValidColumn(column string) bool {
|
||||
}
|
||||
|
||||
var (
|
||||
// PasswordValidator is a validator for the "password" field. It is called by the builders before save.
|
||||
PasswordValidator func(string) error
|
||||
// DefaultCard holds the default value on creation for the "card" field.
|
||||
DefaultCard func() int
|
||||
// DefaultSkill holds the default value on creation for the "skill" field.
|
||||
DefaultSkill func() string
|
||||
// DefaultStatus holds the default value on creation for the "status" field.
|
||||
DefaultStatus func() string
|
||||
// DefaultCp holds the default value on creation for the "cp" field.
|
||||
@ -77,3 +99,75 @@ var (
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() time.Time
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the Card 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()
|
||||
}
|
||||
|
||||
// ByPassword orders the results by the password field.
|
||||
func ByPassword(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPassword, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCard orders the results by the card field.
|
||||
func ByCard(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCard, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySkill orders the results by the skill field.
|
||||
func BySkill(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSkill, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatus orders the results by the status field.
|
||||
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByToken orders the results by the token field.
|
||||
func ByToken(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldToken, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCp orders the results by the cp field.
|
||||
func ByCp(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCp, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByURL orders the results by the url field.
|
||||
func ByURL(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldURL, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCount orders the results by the count field.
|
||||
func ByCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCount, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAuthor orders the results by the author field.
|
||||
func ByAuthor(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAuthor, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOwnerField orders the results by owner field.
|
||||
func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newOwnerStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
func newOwnerStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(OwnerInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn),
|
||||
)
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
package card
|
||||
|
||||
import (
|
||||
"t/ent/predicate"
|
||||
"api/ent/predicate"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
@ -55,16 +55,31 @@ func IDLTE(id int) predicate.Card {
|
||||
return predicate.Card(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.
|
||||
func Password(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldPassword, v))
|
||||
}
|
||||
|
||||
// Card applies equality check predicate on the "card" field. It's identical to CardEQ.
|
||||
func Card(v int) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldCard, v))
|
||||
}
|
||||
|
||||
// Skill applies equality check predicate on the "skill" field. It's identical to SkillEQ.
|
||||
func Skill(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldSkill, v))
|
||||
}
|
||||
|
||||
// Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
|
||||
func Status(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldStatus, v))
|
||||
}
|
||||
|
||||
// Token applies equality check predicate on the "token" field. It's identical to TokenEQ.
|
||||
func Token(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldToken, v))
|
||||
}
|
||||
|
||||
// Cp applies equality check predicate on the "cp" field. It's identical to CpEQ.
|
||||
func Cp(v int) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldCp, v))
|
||||
@ -75,11 +90,86 @@ func URL(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldURL, v))
|
||||
}
|
||||
|
||||
// Count applies equality check predicate on the "count" field. It's identical to CountEQ.
|
||||
func Count(v int) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldCount, v))
|
||||
}
|
||||
|
||||
// Author applies equality check predicate on the "author" field. It's identical to AuthorEQ.
|
||||
func Author(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldAuthor, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// PasswordEQ applies the EQ predicate on the "password" field.
|
||||
func PasswordEQ(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldPassword, v))
|
||||
}
|
||||
|
||||
// PasswordNEQ applies the NEQ predicate on the "password" field.
|
||||
func PasswordNEQ(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldNEQ(FieldPassword, v))
|
||||
}
|
||||
|
||||
// PasswordIn applies the In predicate on the "password" field.
|
||||
func PasswordIn(vs ...string) predicate.Card {
|
||||
return predicate.Card(sql.FieldIn(FieldPassword, vs...))
|
||||
}
|
||||
|
||||
// PasswordNotIn applies the NotIn predicate on the "password" field.
|
||||
func PasswordNotIn(vs ...string) predicate.Card {
|
||||
return predicate.Card(sql.FieldNotIn(FieldPassword, vs...))
|
||||
}
|
||||
|
||||
// PasswordGT applies the GT predicate on the "password" field.
|
||||
func PasswordGT(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldGT(FieldPassword, v))
|
||||
}
|
||||
|
||||
// PasswordGTE applies the GTE predicate on the "password" field.
|
||||
func PasswordGTE(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldGTE(FieldPassword, v))
|
||||
}
|
||||
|
||||
// PasswordLT applies the LT predicate on the "password" field.
|
||||
func PasswordLT(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldLT(FieldPassword, v))
|
||||
}
|
||||
|
||||
// PasswordLTE applies the LTE predicate on the "password" field.
|
||||
func PasswordLTE(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldLTE(FieldPassword, v))
|
||||
}
|
||||
|
||||
// PasswordContains applies the Contains predicate on the "password" field.
|
||||
func PasswordContains(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldContains(FieldPassword, v))
|
||||
}
|
||||
|
||||
// PasswordHasPrefix applies the HasPrefix predicate on the "password" field.
|
||||
func PasswordHasPrefix(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldHasPrefix(FieldPassword, v))
|
||||
}
|
||||
|
||||
// PasswordHasSuffix applies the HasSuffix predicate on the "password" field.
|
||||
func PasswordHasSuffix(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldHasSuffix(FieldPassword, v))
|
||||
}
|
||||
|
||||
// PasswordEqualFold applies the EqualFold predicate on the "password" field.
|
||||
func PasswordEqualFold(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldEqualFold(FieldPassword, v))
|
||||
}
|
||||
|
||||
// PasswordContainsFold applies the ContainsFold predicate on the "password" field.
|
||||
func PasswordContainsFold(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldContainsFold(FieldPassword, v))
|
||||
}
|
||||
|
||||
// CardEQ applies the EQ predicate on the "card" field.
|
||||
func CardEQ(v int) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldCard, v))
|
||||
@ -130,6 +220,81 @@ func CardNotNil() predicate.Card {
|
||||
return predicate.Card(sql.FieldNotNull(FieldCard))
|
||||
}
|
||||
|
||||
// SkillEQ applies the EQ predicate on the "skill" field.
|
||||
func SkillEQ(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldSkill, v))
|
||||
}
|
||||
|
||||
// SkillNEQ applies the NEQ predicate on the "skill" field.
|
||||
func SkillNEQ(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldNEQ(FieldSkill, v))
|
||||
}
|
||||
|
||||
// SkillIn applies the In predicate on the "skill" field.
|
||||
func SkillIn(vs ...string) predicate.Card {
|
||||
return predicate.Card(sql.FieldIn(FieldSkill, vs...))
|
||||
}
|
||||
|
||||
// SkillNotIn applies the NotIn predicate on the "skill" field.
|
||||
func SkillNotIn(vs ...string) predicate.Card {
|
||||
return predicate.Card(sql.FieldNotIn(FieldSkill, vs...))
|
||||
}
|
||||
|
||||
// SkillGT applies the GT predicate on the "skill" field.
|
||||
func SkillGT(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldGT(FieldSkill, v))
|
||||
}
|
||||
|
||||
// SkillGTE applies the GTE predicate on the "skill" field.
|
||||
func SkillGTE(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldGTE(FieldSkill, v))
|
||||
}
|
||||
|
||||
// SkillLT applies the LT predicate on the "skill" field.
|
||||
func SkillLT(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldLT(FieldSkill, v))
|
||||
}
|
||||
|
||||
// SkillLTE applies the LTE predicate on the "skill" field.
|
||||
func SkillLTE(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldLTE(FieldSkill, v))
|
||||
}
|
||||
|
||||
// SkillContains applies the Contains predicate on the "skill" field.
|
||||
func SkillContains(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldContains(FieldSkill, v))
|
||||
}
|
||||
|
||||
// SkillHasPrefix applies the HasPrefix predicate on the "skill" field.
|
||||
func SkillHasPrefix(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldHasPrefix(FieldSkill, v))
|
||||
}
|
||||
|
||||
// SkillHasSuffix applies the HasSuffix predicate on the "skill" field.
|
||||
func SkillHasSuffix(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldHasSuffix(FieldSkill, v))
|
||||
}
|
||||
|
||||
// SkillIsNil applies the IsNil predicate on the "skill" field.
|
||||
func SkillIsNil() predicate.Card {
|
||||
return predicate.Card(sql.FieldIsNull(FieldSkill))
|
||||
}
|
||||
|
||||
// SkillNotNil applies the NotNil predicate on the "skill" field.
|
||||
func SkillNotNil() predicate.Card {
|
||||
return predicate.Card(sql.FieldNotNull(FieldSkill))
|
||||
}
|
||||
|
||||
// SkillEqualFold applies the EqualFold predicate on the "skill" field.
|
||||
func SkillEqualFold(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldEqualFold(FieldSkill, v))
|
||||
}
|
||||
|
||||
// SkillContainsFold applies the ContainsFold predicate on the "skill" field.
|
||||
func SkillContainsFold(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldContainsFold(FieldSkill, v))
|
||||
}
|
||||
|
||||
// StatusEQ applies the EQ predicate on the "status" field.
|
||||
func StatusEQ(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldStatus, v))
|
||||
@ -205,6 +370,81 @@ func StatusContainsFold(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldContainsFold(FieldStatus, v))
|
||||
}
|
||||
|
||||
// TokenEQ applies the EQ predicate on the "token" field.
|
||||
func TokenEQ(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldToken, v))
|
||||
}
|
||||
|
||||
// TokenNEQ applies the NEQ predicate on the "token" field.
|
||||
func TokenNEQ(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldNEQ(FieldToken, v))
|
||||
}
|
||||
|
||||
// TokenIn applies the In predicate on the "token" field.
|
||||
func TokenIn(vs ...string) predicate.Card {
|
||||
return predicate.Card(sql.FieldIn(FieldToken, vs...))
|
||||
}
|
||||
|
||||
// TokenNotIn applies the NotIn predicate on the "token" field.
|
||||
func TokenNotIn(vs ...string) predicate.Card {
|
||||
return predicate.Card(sql.FieldNotIn(FieldToken, vs...))
|
||||
}
|
||||
|
||||
// TokenGT applies the GT predicate on the "token" field.
|
||||
func TokenGT(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldGT(FieldToken, v))
|
||||
}
|
||||
|
||||
// TokenGTE applies the GTE predicate on the "token" field.
|
||||
func TokenGTE(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldGTE(FieldToken, v))
|
||||
}
|
||||
|
||||
// TokenLT applies the LT predicate on the "token" field.
|
||||
func TokenLT(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldLT(FieldToken, v))
|
||||
}
|
||||
|
||||
// TokenLTE applies the LTE predicate on the "token" field.
|
||||
func TokenLTE(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldLTE(FieldToken, v))
|
||||
}
|
||||
|
||||
// TokenContains applies the Contains predicate on the "token" field.
|
||||
func TokenContains(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldContains(FieldToken, v))
|
||||
}
|
||||
|
||||
// TokenHasPrefix applies the HasPrefix predicate on the "token" field.
|
||||
func TokenHasPrefix(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldHasPrefix(FieldToken, v))
|
||||
}
|
||||
|
||||
// TokenHasSuffix applies the HasSuffix predicate on the "token" field.
|
||||
func TokenHasSuffix(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldHasSuffix(FieldToken, v))
|
||||
}
|
||||
|
||||
// TokenIsNil applies the IsNil predicate on the "token" field.
|
||||
func TokenIsNil() predicate.Card {
|
||||
return predicate.Card(sql.FieldIsNull(FieldToken))
|
||||
}
|
||||
|
||||
// TokenNotNil applies the NotNil predicate on the "token" field.
|
||||
func TokenNotNil() predicate.Card {
|
||||
return predicate.Card(sql.FieldNotNull(FieldToken))
|
||||
}
|
||||
|
||||
// TokenEqualFold applies the EqualFold predicate on the "token" field.
|
||||
func TokenEqualFold(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldEqualFold(FieldToken, v))
|
||||
}
|
||||
|
||||
// TokenContainsFold applies the ContainsFold predicate on the "token" field.
|
||||
func TokenContainsFold(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldContainsFold(FieldToken, v))
|
||||
}
|
||||
|
||||
// CpEQ applies the EQ predicate on the "cp" field.
|
||||
func CpEQ(v int) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldCp, v))
|
||||
@ -330,6 +570,131 @@ func URLContainsFold(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldContainsFold(FieldURL, v))
|
||||
}
|
||||
|
||||
// CountEQ applies the EQ predicate on the "count" field.
|
||||
func CountEQ(v int) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldCount, v))
|
||||
}
|
||||
|
||||
// CountNEQ applies the NEQ predicate on the "count" field.
|
||||
func CountNEQ(v int) predicate.Card {
|
||||
return predicate.Card(sql.FieldNEQ(FieldCount, v))
|
||||
}
|
||||
|
||||
// CountIn applies the In predicate on the "count" field.
|
||||
func CountIn(vs ...int) predicate.Card {
|
||||
return predicate.Card(sql.FieldIn(FieldCount, vs...))
|
||||
}
|
||||
|
||||
// CountNotIn applies the NotIn predicate on the "count" field.
|
||||
func CountNotIn(vs ...int) predicate.Card {
|
||||
return predicate.Card(sql.FieldNotIn(FieldCount, vs...))
|
||||
}
|
||||
|
||||
// CountGT applies the GT predicate on the "count" field.
|
||||
func CountGT(v int) predicate.Card {
|
||||
return predicate.Card(sql.FieldGT(FieldCount, v))
|
||||
}
|
||||
|
||||
// CountGTE applies the GTE predicate on the "count" field.
|
||||
func CountGTE(v int) predicate.Card {
|
||||
return predicate.Card(sql.FieldGTE(FieldCount, v))
|
||||
}
|
||||
|
||||
// CountLT applies the LT predicate on the "count" field.
|
||||
func CountLT(v int) predicate.Card {
|
||||
return predicate.Card(sql.FieldLT(FieldCount, v))
|
||||
}
|
||||
|
||||
// CountLTE applies the LTE predicate on the "count" field.
|
||||
func CountLTE(v int) predicate.Card {
|
||||
return predicate.Card(sql.FieldLTE(FieldCount, v))
|
||||
}
|
||||
|
||||
// CountIsNil applies the IsNil predicate on the "count" field.
|
||||
func CountIsNil() predicate.Card {
|
||||
return predicate.Card(sql.FieldIsNull(FieldCount))
|
||||
}
|
||||
|
||||
// CountNotNil applies the NotNil predicate on the "count" field.
|
||||
func CountNotNil() predicate.Card {
|
||||
return predicate.Card(sql.FieldNotNull(FieldCount))
|
||||
}
|
||||
|
||||
// AuthorEQ applies the EQ predicate on the "author" field.
|
||||
func AuthorEQ(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldAuthor, v))
|
||||
}
|
||||
|
||||
// AuthorNEQ applies the NEQ predicate on the "author" field.
|
||||
func AuthorNEQ(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldNEQ(FieldAuthor, v))
|
||||
}
|
||||
|
||||
// AuthorIn applies the In predicate on the "author" field.
|
||||
func AuthorIn(vs ...string) predicate.Card {
|
||||
return predicate.Card(sql.FieldIn(FieldAuthor, vs...))
|
||||
}
|
||||
|
||||
// AuthorNotIn applies the NotIn predicate on the "author" field.
|
||||
func AuthorNotIn(vs ...string) predicate.Card {
|
||||
return predicate.Card(sql.FieldNotIn(FieldAuthor, vs...))
|
||||
}
|
||||
|
||||
// AuthorGT applies the GT predicate on the "author" field.
|
||||
func AuthorGT(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldGT(FieldAuthor, v))
|
||||
}
|
||||
|
||||
// AuthorGTE applies the GTE predicate on the "author" field.
|
||||
func AuthorGTE(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldGTE(FieldAuthor, v))
|
||||
}
|
||||
|
||||
// AuthorLT applies the LT predicate on the "author" field.
|
||||
func AuthorLT(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldLT(FieldAuthor, v))
|
||||
}
|
||||
|
||||
// AuthorLTE applies the LTE predicate on the "author" field.
|
||||
func AuthorLTE(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldLTE(FieldAuthor, v))
|
||||
}
|
||||
|
||||
// AuthorContains applies the Contains predicate on the "author" field.
|
||||
func AuthorContains(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldContains(FieldAuthor, v))
|
||||
}
|
||||
|
||||
// AuthorHasPrefix applies the HasPrefix predicate on the "author" field.
|
||||
func AuthorHasPrefix(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldHasPrefix(FieldAuthor, v))
|
||||
}
|
||||
|
||||
// AuthorHasSuffix applies the HasSuffix predicate on the "author" field.
|
||||
func AuthorHasSuffix(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldHasSuffix(FieldAuthor, v))
|
||||
}
|
||||
|
||||
// AuthorIsNil applies the IsNil predicate on the "author" field.
|
||||
func AuthorIsNil() predicate.Card {
|
||||
return predicate.Card(sql.FieldIsNull(FieldAuthor))
|
||||
}
|
||||
|
||||
// AuthorNotNil applies the NotNil predicate on the "author" field.
|
||||
func AuthorNotNil() predicate.Card {
|
||||
return predicate.Card(sql.FieldNotNull(FieldAuthor))
|
||||
}
|
||||
|
||||
// AuthorEqualFold applies the EqualFold predicate on the "author" field.
|
||||
func AuthorEqualFold(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldEqualFold(FieldAuthor, v))
|
||||
}
|
||||
|
||||
// AuthorContainsFold applies the ContainsFold predicate on the "author" field.
|
||||
func AuthorContainsFold(v string) predicate.Card {
|
||||
return predicate.Card(sql.FieldContainsFold(FieldAuthor, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.Card {
|
||||
return predicate.Card(sql.FieldEQ(FieldCreatedAt, v))
|
||||
@ -394,11 +759,7 @@ func HasOwner() predicate.Card {
|
||||
// HasOwnerWith applies the HasEdge predicate on the "owner" edge with a given conditions (other predicates).
|
||||
func HasOwnerWith(preds ...predicate.User) predicate.Card {
|
||||
return predicate.Card(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(OwnerInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn),
|
||||
)
|
||||
step := newOwnerStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
Reference in New Issue
Block a user