coba landing page hanan

This commit is contained in:
Hanan Askarim
2024-04-29 14:45:12 +07:00
parent 99d7fd5159
commit 61788b3c85
8 changed files with 956 additions and 11 deletions

26
db/landingpage.store.go Normal file
View File

@@ -0,0 +1,26 @@
package db
import (
"database/sql"
_ "github.com/glebarez/go-sqlite"
)
type LandingPageStore struct {
Db *sql.DB
}
func NewLandingPageStore(dbName string) (LandingPageStore, error) {
Db, err := getConnection(dbName)
if err != nil {
return LandingPageStore{}, err
}
if err := createMigrations(dbName, Db); err != nil {
return LandingPageStore{}, err
}
return LandingPageStore{
Db,
}, nil
}