18 lines
439 B
Go
18 lines
439 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
type Short struct {
|
|
// ID is the unique identifier of the short.
|
|
ID string `json:"id"`
|
|
// Name is the shortened name of the URL.
|
|
Name string `json:"name,omitempty"`
|
|
// URL is the URL that is shortened.
|
|
URL string `json:"url"`
|
|
// CreatedAt is the time the short was created.
|
|
CreatedAt time.Time `json:"createdAt,omitempty"`
|
|
|
|
// UserID of the user that created the short.
|
|
UserID *string `json:"-"`
|
|
}
|