set and get now work trough endpoint api

This commit is contained in:
zipfriis
2026-03-25 17:44:04 +01:00
parent b9f462f5be
commit e056d8a37e
7 changed files with 82 additions and 18 deletions

View File

@@ -23,17 +23,17 @@ func InitDB(db *sql.DB) {
shares INTEGER NOT NULL,
product INTEGER NOT NULL CHECK(product IN (0, 1, 2, 3)),
type INTEGER NOT NULL CHECK(type IN (0, 1)),
price REAL NOT NULL
price REAL NOT NULL,
traded_at DATETIME NOT NULL
);
CREATE TABLE IF NOT EXISTS position (
id INTEGER PRIMARY KEY AUTOINCREMENT,
company_id INTEGER NOT NULL,
id INTEGER PRIMARY KEY AUTOINCREMENT,
company_id INTEGER NOT NULL,
currency_id INTEGER NOT NULL,
shares INTEGER NOT NULL,
weight REAL NOT NULL,
CostBases REAL NOT NULL,
shares INTEGER NOT NULL,
weight REAL NOT NULL,
cost_basis REAL NOT NULL
);
CREATE TABLE IF NOT EXISTS companies (