Skip to content

Commit

Permalink
chore: merging with main
Browse files Browse the repository at this point in the history
  • Loading branch information
TalentedB committed Aug 12, 2023
1 parent 5aedd1f commit 30174e1
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions db/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ type SchoolFollow struct {

// ! Very important that SOME FIELDS ARE NOT EVER SERIALIZED TO PROTECT SENSATIVE DATA (json:"-")
type Post struct {
<<<<<<< HEAD
ID int `gorm:"primary_key;column:id" json:"id"`
CreatedAt TimeMicros `gorm:"column:created_at;autoCreateTime" json:"created_at"`
UpdatedAt TimeMicros `gorm:"column:updated_at;autoUpdateTime" json:"updated_at"`
Expand All @@ -180,33 +179,6 @@ type Post struct {
Category PostCategory `gorm:"foreignKey:CategoryID" json:"category"`
CommentCount uint `gorm:"column:comment_count" json:"comment_count"`
CommentNumerics uint `gorm:"column:comment_numerics" json:"comment_numerics"`
=======
ID EncryptedID `gorm:"primary_key;column:id" json:"id"`
CreatedAt TimeMicros `gorm:"column:created_at;autoCreateTime" json:"created_at"`
UpdatedAt TimeMicros `gorm:"column:updated_at;autoUpdateTime" json:"updated_at"`
UserID string `gorm:"column:user_id" json:"-"`
SchoolID EncryptedID `gorm:"column:school_id" json:"-"`
School School `gorm:"foreignKey:SchoolID" json:"school"`
FacultyID *EncryptedID `gorm:"column:faculty_id" json:"-"`
Faculty Faculty `gorm:"foreignKey:FacultyID" json:"faculty"`
YearOfStudyID *EncryptedID `gorm:"column:year_of_study_id" json:"-"`
YearOfStudy YearOfStudy `gorm:"foreignKey:YearOfStudyID" json:"year_of_study"`
Title string `gorm:"column:title" json:"title"`
Content string `gorm:"column:content" json:"content"`
Downvote uint `gorm:"column:downvote" json:"downvote"`
Upvote uint `gorm:"column:upvote" json:"upvote"`
VoteScore int `gorm:"column:vote_score" json:"-"` // redundant to return to the user
TrendingScore float64 `gorm:"column:trending_score" json:"trending_score"`
HottestOn *datatypes.Date `gorm:"column:hottest_on" json:"hottest_on"` // intentionally a pointer, so that it defaults to NULL when created and not specified (i.e. not its zero-value)
Hidden bool `gorm:"column:hidden" json:"hidden"`
Sentiment *float64 `gorm:"column:sentiment" json:"sentiment"`
ReportCount uint `gorm:"column:report_count" json:"-"`
ReviewedByMod bool `gorm:"column:reviewed_by_mod" json:"-"`
Edited bool `gorm:"column:edited" json:"edited"`
CategoryID EncryptedID `gorm:"column:category_id" json:"-"`
Category PostCategory `gorm:"foreignKey:CategoryID" json:"category"`
CommentCount uint `gorm:"column:comment_count" json:"comment_count"`
>>>>>>> 44d2ad40aba3a2c1f720d4f8cb5371c1c68c4370
}

// ! Very important that SOME FIELDS ARE NOT EVER SERIALIZED TO PROTECT SENSATIVE DATA (json:"-")
Expand Down

0 comments on commit 30174e1

Please sign in to comment.