edit: field Shortcode dan expire duration

This commit is contained in:
mario
2025-05-17 09:38:40 +07:00
parent ed3feb77d2
commit 3aa155dfbc
7 changed files with 56 additions and 19 deletions

View File

@@ -3,7 +3,7 @@ package models
// ShortLink represents a short URL token for patient access
type ShortLink struct {
ID string `db:"id" json:"id"`
Token string `db:"token" json:"token"` // The short token used in the URL
Shortcode string `db:"shortcode" json:"shortcode"` // The short token used in the URL
PatientID string `db:"patient_id" json:"patient_id"`
StudyUID string `db:"study_uid" json:"study_uid"` // The StudyInstanceUID this token grants access to
HashedDOB string `db:"hashed_dob" json:"-"` // Hashed Date of Birth for verification
@@ -26,6 +26,7 @@ type GenerateShortLinkRequest struct {
type GenerateShortLinkResponse struct {
ShortToken string `json:"short_token"`
FullURL string `json:"full_url"`
URI string `json:"uri"` // The URI path and query without the base URL
ExpiresAt string `json:"expires_at"`
IsExisting bool `json:"is_existing"` // Indicates if this is an existing link that was reused
}