/
types.go
executable file
·31 lines (28 loc) · 1.18 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package offer
import (
// "github.com/MerinEREN/iiPackages/datastore/price"
"time"
)
// Offer is the struct for user offers.
// INFORM DEMAND OWNER WHEN AN OFFER MODIFIED !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// Status is available, accepted, notAccepted, changed, removed, successful,
// unsuccessful.
// backup (ONLY AUTHORIZED ACCOUNTS WHO ACCEPTED TO BE BACKUP) !!!!!!!!!!!!!!!!!!!!
// Demand key is the ancestor key.
// AccountID is used to link the account.
type Offer struct {
ID string `datastore:"-"`
UserID string `json:"userID"`
AccountID string `datastore:"-" json:"accountID"`
Description string `datastore:",noindex" json:"description"`
Amount float64 `datastore:",noindex" json:"amount"`
Created time.Time `json:"created"`
Status string `json:"status"`
/* Price price.Price `datastore:",noindex" json:"price"`
StartTime time.Time `datastore:",noindex" json:"startTime"`
Duration string `datastore:",noindex" json:"duration"`
CustomerReview string `json:"customerreview"`
Score score.Score `json:"score"` */
}
// Offers is map[string]*Offer.
type Offers map[string]*Offer