feat(links): create basic link shortening algo

This commit is contained in:
maotovisk 2025-08-06 23:16:55 -03:00
parent fc46164556
commit 81e72cedfa
9 changed files with 144 additions and 23 deletions

View file

@ -6,7 +6,7 @@ import (
type Link struct {
ID int64 `json:"id"`
ShortURL string `json:"short_url"`
ShortURL string `json:"short_url" gorm:"uniqueIndex"`
LongURL string `json:"long_url"`
CreatedAt time.Time `json:"created_at"`
}