feat: full redy blog and admin panel

This commit is contained in:
d3m0k1d
2026-02-15 16:34:14 +03:00
parent 8d6225f136
commit 7f8d8373a9
18 changed files with 3236 additions and 39 deletions

View File

@@ -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(

View File

@@ -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 {