added comments and added a comment end point

This commit is contained in:
rawleyIfowler
2022-02-25 17:59:48 -06:00
parent 979ef41aec
commit 598f372acd
4 changed files with 37 additions and 13 deletions

View File

@@ -22,8 +22,8 @@ import (
type Comment struct {
gorm.Model
Id uint `json:"id" gorm: "primaryKey" gorm: "unique"`
Date string `json:"date"`
Id uint `json:"id" gorm:"primaryKey, AUTO_INCREMENT"`
Date string `json:"date" gorm:"default:NOW()"`
Author string `json:"author" form:"author"`
Content string `json:"content" form:"content"`
AssociatedPost string