forked from shijuvar/go-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
34 lines (31 loc) · 1.05 KB
/
models.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
package models
import (
"time"
"gopkg.in/mgo.v2/bson"
)
type (
User struct {
Id bson.ObjectId `bson:"_id,omitempty" json:"id"`
FirstName string `json:"firstname"`
LastName string `json:"lastname"`
Email string `json:"email"`
Password string `json:"password,omitempty"`
HashPassword []byte `json:"hashpassword,omitempty"`
}
Task struct {
Id bson.ObjectId `bson:"_id,omitempty" json:"id"`
CreatedBy string `json:"createdby"`
Name string `json:"name"`
Description string `json:"description"`
CreatedOn time.Time `json:"createdon,omitempty"`
Due time.Time `json:"due,omitempty"`
Status string `json:"status,omitempty"`
Tags []string `json:"tags,omitempty"`
}
TaskNote struct {
Id bson.ObjectId `bson:"_id,omitempty" json:"id"`
TaskId bson.ObjectId `json:"taskid"`
Description string `json:"description"`
CreatedOn time.Time `json:"createdon,omitempty"`
}
)