chore: add first handlers

This commit is contained in:
d3m0k1d
2026-04-29 12:59:23 +03:00
parent d0028cdd32
commit 56a8bfa766
8 changed files with 146 additions and 80 deletions
+15
View File
@@ -0,0 +1,15 @@
package storage
import (
"github.com/jackc/pgx/v5/pgxpool"
)
type Repository struct {
pool *pgxpool.Pool
}
func NewRepository(pool *pgxpool.Pool) *Repository {
return &Repository{
pool: pool,
}
}
+22
View File
@@ -0,0 +1,22 @@
package storage
type BaleType struct {
ID int `json:"id"`
Type string `json:"type"`
Weight float64 `json:"weight"`
Height float64 `json:"height"`
Width float64 `json:"width"`
Length float64 `json:"length"`
}
type Bale struct {
ID int `json:"id"`
Type string `json:"type"`
Timestamp string `json:"timestamp"`
}
type User struct {
ID int `json:"id"`
Username string `json:"username"`
Password string `json:"password"`
}