feat: full redy blog and admin panel
This commit is contained in:
@@ -6,7 +6,8 @@ CREATE TABLE IF NOT EXISTS posts(
|
||||
title TEXT NOT NULL,
|
||||
published BOOLEAN DEFAULT 0,
|
||||
content TEXT NOT NULL,
|
||||
CREATED_AT DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
CREATED_AT DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at DATETIME
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS users(
|
||||
|
||||
@@ -9,9 +9,10 @@ type Post struct {
|
||||
}
|
||||
|
||||
type PostReq struct {
|
||||
ID int `db:"id" json:"id"`
|
||||
Title string `db:"title" json:"title"`
|
||||
Content string `db:"content" json:"content"`
|
||||
ID int `db:"id" json:"id"`
|
||||
Title string `db:"title" json:"title"`
|
||||
Content string `db:"content" json:"content"`
|
||||
CreatedAt string `db:"created" json:"created_at"`
|
||||
}
|
||||
|
||||
type PostCreate struct {
|
||||
|
||||
Reference in New Issue
Block a user