ready for rpa

This commit is contained in:
ctengiz
2024-03-26 10:55:22 +03:00
parent 465aae3710
commit f2939d6c4d
17 changed files with 1362 additions and 90 deletions

View File

@@ -1,7 +1,7 @@
package company
import (
"bordrobot/lib/db"
"bordrobot/lib/run"
)
type Company struct {
@@ -16,6 +16,6 @@ func (c *Company) Create() error {
insert into company (name, member_number, username, password)
VALUES (:name, :member_number, :username, :password)
`
_, err := db.DB.NamedExec(sq, &c)
_, err := run.DB.NamedExec(sq, &c)
return err
}

View File

@@ -1,12 +1,12 @@
package company
import (
"bordrobot/lib/db"
"bordrobot/lib/run"
"testing"
)
func TestCompany_Create(t *testing.T) {
err := db.InitDB("../..")
err := run.InitDB("../..")
if err != nil {
t.Fatal(err)
}
@@ -23,5 +23,5 @@ func TestCompany_Create(t *testing.T) {
t.Fatal(err)
}
db.DB.Close()
run.DB.Close()
}