12 lines
No EOL
301 B
Go
12 lines
No EOL
301 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
type Post struct {
|
|
ID uint `gorm:"primaryKey" json:"id"`
|
|
Title string `json:"title"`
|
|
Content string `json:"content"`
|
|
Upvotes int `json:"upvotes"`
|
|
Downvotes int `json:"downvotes"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
} |