diff options
| author | jackyzha0 <[email protected]> | 2020-05-09 17:40:41 -0700 |
|---|---|---|
| committer | jackyzha0 <[email protected]> | 2020-05-09 17:40:41 -0700 |
| commit | 66727df2c1aa369b9250e7596fea6c8ae8385eaa (patch) | |
| tree | 540dc43adfe6f346490993d5d81b42563aeaeada /db/schemas.go | |
| parent | Merge pull request #2 from jackyzha0/api (diff) | |
| download | ctrl-v-66727df2c1aa369b9250e7596fea6c8ae8385eaa.tar.xz ctrl-v-66727df2c1aa369b9250e7596fea6c8ae8385eaa.zip | |
add document ttl
Diffstat (limited to 'db/schemas.go')
| -rw-r--r-- | db/schemas.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/db/schemas.go b/db/schemas.go index bad1e53..bdfa60c 100644 --- a/db/schemas.go +++ b/db/schemas.go @@ -1,12 +1,15 @@ package db -import "github.com/globalsign/mgo/bson" +import ( + "time" + + "github.com/globalsign/mgo/bson" +) // Paste represents a single paste type Paste struct { ID bson.ObjectId `bson:"_id,omitempty"` Hash string Content string + Expiry time.Time `bson:"expiry"` } - -// add timestamp and expiry later |