aboutsummaryrefslogtreecommitdiff
path: root/db/schemas.go
diff options
context:
space:
mode:
authorjackyzha0 <[email protected]>2020-05-09 17:40:41 -0700
committerjackyzha0 <[email protected]>2020-05-09 17:40:41 -0700
commit66727df2c1aa369b9250e7596fea6c8ae8385eaa (patch)
tree540dc43adfe6f346490993d5d81b42563aeaeada /db/schemas.go
parentMerge pull request #2 from jackyzha0/api (diff)
downloadctrl-v-66727df2c1aa369b9250e7596fea6c8ae8385eaa.tar.xz
ctrl-v-66727df2c1aa369b9250e7596fea6c8ae8385eaa.zip
add document ttl
Diffstat (limited to 'db/schemas.go')
-rw-r--r--db/schemas.go9
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