Skip to content

Instantly share code, notes, and snippets.

@ridhoperdana
Created September 23, 2019 02:05
Show Gist options
  • Select an option

  • Save ridhoperdana/aec7d4cac2f1769b14df29a5576591db to your computer and use it in GitHub Desktop.

Select an option

Save ridhoperdana/aec7d4cac2f1769b14df29a5576591db to your computer and use it in GitHub Desktop.
package models
import (
"time"
)
// Article represent the article model
type Article struct {
ID int64 `json:"id"`
Title string `json:"title" validate:"required"`
Content string `json:"content" validate:"required"`
Author Author `json:"author"`
UpdatedAt time.Time `json:"updated_at"`
CreatedAt time.Time `json:"created_at"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment