1
0
This commit is contained in:
2024-04-11 06:54:13 +09:00
parent 9d1838f75d
commit 0e4f081101
15 changed files with 540 additions and 28 deletions

View File

@ -30,6 +30,8 @@ const (
FieldUID = "uid"
// FieldCid holds the string denoting the cid field in the database.
FieldCid = "cid"
// FieldCard holds the string denoting the card field in the database.
FieldCard = "card"
// 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.
@ -58,6 +60,7 @@ var Columns = []string{
FieldDid,
FieldUID,
FieldCid,
FieldCard,
FieldUpdatedAt,
FieldCreatedAt,
}
@ -140,6 +143,11 @@ func ByCid(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCid, opts...).ToFunc()
}
// ByCard orders the results by the card field.
func ByCard(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCard, opts...).ToFunc()
}
// ByUpdatedAt orders the results by the updated_at field.
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()

View File

@ -95,6 +95,11 @@ func Cid(v int) predicate.Sev {
return predicate.Sev(sql.FieldEQ(FieldCid, v))
}
// Card applies equality check predicate on the "card" field. It's identical to CardEQ.
func Card(v int) predicate.Sev {
return predicate.Sev(sql.FieldEQ(FieldCard, v))
}
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAt(v time.Time) predicate.Sev {
return predicate.Sev(sql.FieldEQ(FieldUpdatedAt, v))
@ -565,6 +570,56 @@ func CidNotNil() predicate.Sev {
return predicate.Sev(sql.FieldNotNull(FieldCid))
}
// CardEQ applies the EQ predicate on the "card" field.
func CardEQ(v int) predicate.Sev {
return predicate.Sev(sql.FieldEQ(FieldCard, v))
}
// CardNEQ applies the NEQ predicate on the "card" field.
func CardNEQ(v int) predicate.Sev {
return predicate.Sev(sql.FieldNEQ(FieldCard, v))
}
// CardIn applies the In predicate on the "card" field.
func CardIn(vs ...int) predicate.Sev {
return predicate.Sev(sql.FieldIn(FieldCard, vs...))
}
// CardNotIn applies the NotIn predicate on the "card" field.
func CardNotIn(vs ...int) predicate.Sev {
return predicate.Sev(sql.FieldNotIn(FieldCard, vs...))
}
// CardGT applies the GT predicate on the "card" field.
func CardGT(v int) predicate.Sev {
return predicate.Sev(sql.FieldGT(FieldCard, v))
}
// CardGTE applies the GTE predicate on the "card" field.
func CardGTE(v int) predicate.Sev {
return predicate.Sev(sql.FieldGTE(FieldCard, v))
}
// CardLT applies the LT predicate on the "card" field.
func CardLT(v int) predicate.Sev {
return predicate.Sev(sql.FieldLT(FieldCard, v))
}
// CardLTE applies the LTE predicate on the "card" field.
func CardLTE(v int) predicate.Sev {
return predicate.Sev(sql.FieldLTE(FieldCard, v))
}
// CardIsNil applies the IsNil predicate on the "card" field.
func CardIsNil() predicate.Sev {
return predicate.Sev(sql.FieldIsNull(FieldCard))
}
// CardNotNil applies the NotNil predicate on the "card" field.
func CardNotNil() predicate.Sev {
return predicate.Sev(sql.FieldNotNull(FieldCard))
}
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtEQ(v time.Time) predicate.Sev {
return predicate.Sev(sql.FieldEQ(FieldUpdatedAt, v))