WIP Branch completed: Overhaul of site logic, removed comments, repositories

This commit is contained in:
2022-03-09 04:20:27 +00:00
parent cd7a34be0c
commit 860115cbcc
40 changed files with 730 additions and 564 deletions

View File

@@ -22,11 +22,11 @@ import (
type BlogPost struct {
gorm.Model
Url string `json:"url" gorm:"primaryKey"`
Title string `json:"title" gorm:"unique"`
Date string `json:"date" gorm:"default:NOW()"`
Content string `json:"content"`
Comments []Comment `gorm:"foreignKey:AssociatedPost;references:Url;type:varchar(191)"`
Url string `json:"url" gorm:"primaryKey"`
Title string `json:"title" gorm:"unique"`
Date string `json:"date" gorm:"default:NOW()"`
Content string `json:"content"`
Captcha [2]int `gorm:"-"`
}
func (b BlogPost) Equals(m *BlogPost) bool {