first commit
This commit is contained in:
15
internal/modules/auth/model.go
Normal file
15
internal/modules/auth/model.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package auth
|
||||
|
||||
import "time"
|
||||
|
||||
type RefreshToken struct {
|
||||
ID uint `json:"id" gorm:"primaryKey;autoIncrement"`
|
||||
UserID uint `json:"user_id" gorm:"not null;index"`
|
||||
Token string `json:"token" gorm:"type:varchar(255);uniqueIndex;not null"`
|
||||
ExpiresAt time.Time `json:"expires_at" gorm:"not null"`
|
||||
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
|
||||
}
|
||||
|
||||
func (RefreshToken) TableName() string {
|
||||
return "refresh_tokens"
|
||||
}
|
||||
Reference in New Issue
Block a user