The commit that makes you yell :I GIVE UP!"
This commit is contained in:
parent
f82bd15873
commit
7ab3687614
44 changed files with 15012 additions and 0 deletions
10
backend/models/comment.go
Normal file
10
backend/models/comment.go
Normal file
|
@ -0,0 +1,10 @@
|
|||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type Comment struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
PostID string `json:"post_id"`
|
||||
Content string `json:"content"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
12
backend/models/post.go
Normal file
12
backend/models/post.go
Normal file
|
@ -0,0 +1,12 @@
|
|||
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"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue