From dafe211ec72dae12fd85bbe807a866996bfa810b Mon Sep 17 00:00:00 2001 From: Chang lue Tsen Date: Mon, 28 Apr 2025 11:18:53 -0400 Subject: [PATCH] fix(subscribe): add FinishedAt field to track subscription completion time --- internal/model/user/model.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/model/user/model.go b/internal/model/user/model.go index f8f8a5e..7240c3c 100644 --- a/internal/model/user/model.go +++ b/internal/model/user/model.go @@ -32,6 +32,7 @@ type SubscribeDetails struct { Subscribe *subscribe.Subscribe `gorm:"foreignKey:SubscribeId;references:Id"` StartTime time.Time `gorm:"default:CURRENT_TIMESTAMP(3);not null;comment:Subscription Start Time"` ExpireTime time.Time `gorm:"default:NULL;comment:Subscription Expire Time"` + FinishedAt *time.Time `gorm:"default:NULL;comment:Finished Time"` Traffic int64 `gorm:"default:0;comment:Traffic"` Download int64 `gorm:"default:0;comment:Download Traffic"` Upload int64 `gorm:"default:0;comment:Upload Traffic"`