changes to model
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user