github.com/gudimz/urlShortener@v0.0.0-20230129195305-c8ee33059a67/internal/model/shorten.go (about)

     1  package model
     2  
     3  import (
     4  	"github.com/samber/mo"
     5  	"time"
     6  )
     7  
     8  type Shorten struct {
     9  	ShortUrl    string    `json:"short_url"`
    10  	OriginUrl   string    `json:"origin_url"`
    11  	Visits      int64     `json:"visits"`
    12  	DateCreated time.Time `json:"date_created"`
    13  	DateUpdated time.Time `json:"date_updated"`
    14  }
    15  
    16  type InputShorten struct {
    17  	ShortenUrl mo.Option[string]
    18  	OriginUrl  string
    19  }