-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinvoice.go
45 lines (29 loc) · 1 KB
/
invoice.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package main
import (
"gopkg.in/mgo.v2/bson"
"time"
)
type Invoice struct {
Id bson.ObjectId `json:"id" bson:"_id,omitempty"`
UserID bson.ObjectId `json:"user_id" bson:"user_id"`
Customer Customer `json:"customer" bson:"customer"`
Products Products `json:"products" bson:"products"`
Description string `json:"description" bson:"description"`
Price string `json:"price" bson:"price"`
Valid bool `json:"valid" bson:"valid"`
DateCreated time.Time `json:"date_created" bson:"date_created"`
}
func (invoice *Invoice) CreateInvoice(mConnection *MongoConnection) bool {
return false
}
func (invoice *Invoice) UpdateExistingInvoice(mConnection *MongoConnection) bool {
return false
}
func (invoice *Invoice) DeleteExistingInvoice(mConnection *MongoConnection) bool {
return false
}
func (invoice *Invoice) ListExistingInvoices(mConnection *MongoConnection) []Invoice {
invoices := Invoices{}
return invoices
}
type Invoices []Invoice