Added migrations

This commit is contained in:
KamilM1205 2025-09-20 18:16:26 +04:00
parent 4a16acc87e
commit 5b18009658
34 changed files with 929 additions and 154 deletions

View file

@ -11,12 +11,12 @@ const PostTable = "post"
type Post struct {
Id uuid.UUID `db:"id"`
UserId uuid.UUID `db:"user_id"`
UserId uuid.UUID `db:"userid"`
Title string `db:"title"`
Description string `db:"description"`
Content string `db:"content"`
CreatedAt time.Time `db:"createdAt"`
UpdatedAt time.Time `db:"updatedAt"`
CreatedAt time.Time `db:"createdat"`
UpdatedAt time.Time `db:"updatedat"`
}
func CreatePost(userId uuid.UUID, title string, description string, content string) (post Post, err error) {