sunguroku 5 лет назад
Родитель
Сommit
12efcd933d
1 измененных файлов с 18 добавлено и 0 удалено
  1. 18 0
      internal/models/session.go

+ 18 - 0
internal/models/session.go

@@ -0,0 +1,18 @@
+package models
+
+import (
+	"time"
+
+	"github.com/jinzhu/gorm"
+)
+
+// Session type that extends gorm.Model.
+type Session struct {
+	gorm.Model
+	// Session ID
+	Key string
+	// encrypted cookie
+	Data []byte
+	// Time the session will expire
+	ExpiresAt time.Time
+}