primer intento de servicio para acortar urls
This commit is contained in:
10
models/url.go
Normal file
10
models/url.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type Url struct {
|
||||
Shorturl string `gorm:"primaryKey"`
|
||||
// Id uint64 `gorm: "primaryKey;autoIncrement"`
|
||||
Longurl string `gorm:"uniqueIndex:idx_lurl"`
|
||||
Time time.Time `gorm:"autoCreateTime"`
|
||||
}
|
||||
Reference in New Issue
Block a user