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