mirror of
https://github.com/simon-ding/polaris.git
synced 2026-05-28 05:27:41 +08:00
feat: save torrent link to history
This commit is contained in:
@@ -29,6 +29,8 @@ const (
|
||||
FieldDownloadClientID = "download_client_id"
|
||||
// FieldIndexerID holds the string denoting the indexer_id field in the database.
|
||||
FieldIndexerID = "indexer_id"
|
||||
// FieldLink holds the string denoting the link field in the database.
|
||||
FieldLink = "link"
|
||||
// FieldStatus holds the string denoting the status field in the database.
|
||||
FieldStatus = "status"
|
||||
// FieldSaved holds the string denoting the saved field in the database.
|
||||
@@ -48,6 +50,7 @@ var Columns = []string{
|
||||
FieldSize,
|
||||
FieldDownloadClientID,
|
||||
FieldIndexerID,
|
||||
FieldLink,
|
||||
FieldStatus,
|
||||
FieldSaved,
|
||||
}
|
||||
@@ -141,6 +144,11 @@ func ByIndexerID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIndexerID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLink orders the results by the link field.
|
||||
func ByLink(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLink, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatus orders the results by the status field.
|
||||
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
||||
|
||||
Reference in New Issue
Block a user