changes to model

This commit is contained in:
samantha42
2026-03-26 08:39:42 +01:00
parent ff7b41e2a8
commit 3f878c1dc0
15 changed files with 119 additions and 195 deletions

View File

@@ -1,16 +0,0 @@
package service
import (
"Portifolio/internal/model"
"database/sql"
_ "github.com/mattn/go-sqlite3"
)
func AddCompany(input model.CompanyInput, db *sql.DB) error {
_, err := db.Exec(
`INSERT INTO companies (name, shares_outstanding, price, currency_id) VALUES (?, ?, ?, ?)`,
input.Name, input.SharesOutstanding, input.Price, input.CurrencyID,
)
return err
}