1
0
This commit is contained in:
2024-04-11 07:31:56 +09:00
parent 0e4f081101
commit 9494408008
15 changed files with 589 additions and 77 deletions

View File

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