Added backend

This commit is contained in:
2022-02-06 22:51:36 +01:00
parent 77599e26f8
commit 431cadaeea
35 changed files with 2422 additions and 0 deletions

26
backend/schema/schema.go Normal file
View File

@@ -0,0 +1,26 @@
package schema
type ArticleSummary struct {
Id int `json:"id" gorm:"primaryKey"`
Title string `json:"title"`
Summary string `json:"summary"`
Authors []Author `json:"authors" gorm:"-"`
Image string `json:"image"`
Tags []string `json:"tags" gorm:"-"`
Created int64 `json:"created"`
Modified int64 `json:"modified"`
Link string `json:"link"`
}
type Author struct {
Id int `json:"id" gorm:"primaryKey"`
Name string `json:"name"`
Password string `json:"-"`
Information string `json:"information"`
}
type Asset struct {
Id int `json:"id"`
Name string `json:"name"`
Link string `json:"link"`
}