mirror of
https://github.com/serty2005/rmser.git
synced 2026-02-04 19:02:33 -06:00
Перевел на multi-tenant
Добавил поставщиков Накладные успешно создаются из фронта
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
"regexp"
|
||||
"rmser/internal/domain/account"
|
||||
"rmser/internal/domain/catalog"
|
||||
"rmser/internal/domain/drafts"
|
||||
"rmser/internal/domain/invoices"
|
||||
@@ -13,6 +14,7 @@ import (
|
||||
"rmser/internal/domain/operations"
|
||||
"rmser/internal/domain/recipes"
|
||||
"rmser/internal/domain/recommendations"
|
||||
"rmser/internal/domain/suppliers"
|
||||
"time"
|
||||
|
||||
_ "github.com/jackc/pgx/v5/stdlib"
|
||||
@@ -46,10 +48,13 @@ func NewPostgresDB(dsn string) *gorm.DB {
|
||||
|
||||
// 4. Автомиграция
|
||||
err = db.AutoMigrate(
|
||||
&account.User{},
|
||||
&account.RMSServer{},
|
||||
&catalog.Product{},
|
||||
&catalog.MeasureUnit{},
|
||||
&catalog.ProductContainer{},
|
||||
&catalog.Store{},
|
||||
&suppliers.Supplier{},
|
||||
&recipes.Recipe{},
|
||||
&recipes.RecipeItem{},
|
||||
&invoices.Invoice{},
|
||||
|
||||
Reference in New Issue
Block a user