added time

This commit is contained in:
Darko Luketic
2018-04-03 22:11:59 +02:00
parent 054dc5afce
commit f89589d0db
8 changed files with 74 additions and 14 deletions

View File

@ -4,6 +4,8 @@ import (
"errors"
"fmt"
"time"
"git.icod.de/dalu/refdata/model"
"github.com/globalsign/mgo"
"github.com/globalsign/mgo/bson"
@ -54,6 +56,18 @@ type DataEnabledQuery struct {
Query bool
}
// refid
type DataRefIdQuery struct {
Query string
}
// time
type DataWhenQuery struct {
Operation string
From time.Time
To time.Time
}
type DataParams struct {
Start int // list only
Limit int // list only
@ -66,6 +80,7 @@ type DataParams struct {
Age bool
Price bool
Enabled bool
When bool
IdQuery DataIdQuery // get only
NameQuery DataNameQuery
@ -74,6 +89,7 @@ type DataParams struct {
AgeQuery DataAgeQuery
PriceQuery DataPriceQuery
EnabledQuery DataEnabledQuery
WhenQuery DataWhenQuery
}
type DataRepository struct {