From def34ab5fb4be7407521857f87197fc0bc0809fe Mon Sep 17 00:00:00 2001 From: Ralic Lo Date: Mon, 22 Feb 2021 13:03:12 +0800 Subject: [PATCH] Add ActivatedAt for scheduling future events. --- model.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/model.go b/model.go index 3334d17c..34d3da0d 100644 --- a/model.go +++ b/model.go @@ -8,8 +8,10 @@ import "time" // gorm.Model // } type Model struct { - ID uint `gorm:"primarykey"` - CreatedAt time.Time - UpdatedAt time.Time - DeletedAt DeletedAt `gorm:"index"` + ID uint `gorm:"primarykey"` + ActivatedAt time.Time `gorm:"not null"` + CreatedAt time.Time + UpdatedAt time.Time + DeletedAt gorm.DeletedAt `gorm:"index"` } +