package listing import ( "net/url" "time" "codeberg.org/mihna123/openstore/internal/user" ) type Location struct { city string street string premise string } type Status int const ( DraftStatus Status = iota PublishedStatus ClosedStatus ) var statusName = map[Status]string{ DraftStatus: "draft", PublishedStatus: "published", ClosedStatus: "closed", } func (s Status) String() string { return statusName[s] } type Listing struct { id int title string slug string description string images []string price float64 currency string category []string location Location status Status views int createdAt time.Time author *user.User isExternal bool origin *url.URL }