feat(links): create basic link shortening algo
This commit is contained in:
parent
fc46164556
commit
81e72cedfa
9 changed files with 144 additions and 23 deletions
|
|
@ -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"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue