Перевел на multi-tenant

Добавил поставщиков
Накладные успешно создаются из фронта
This commit is contained in:
2025-12-18 03:56:21 +03:00
parent 47ec8094e5
commit 542beafe0e
38 changed files with 1942 additions and 977 deletions

View File

@@ -12,6 +12,7 @@ import (
// Invoice - Приходная накладная
type Invoice struct {
ID uuid.UUID `gorm:"type:uuid;primary_key;"`
RMSServerID uuid.UUID `gorm:"type:uuid;not null;index"`
DocumentNumber string `gorm:"type:varchar(100);index"`
DateIncoming time.Time `gorm:"index"`
SupplierID uuid.UUID `gorm:"type:uuid;index"`
@@ -39,6 +40,7 @@ type InvoiceItem struct {
}
type Repository interface {
GetLastInvoiceDate() (*time.Time, error)
GetLastInvoiceDate(serverID uuid.UUID) (*time.Time, error)
SaveInvoices(invoices []Invoice) error
CountRecent(serverID uuid.UUID, days int) (int64, error)
}