Initial commit.

This commit is contained in:
2025-08-12 18:10:43 +02:00
commit 25a0db9b1e
44 changed files with 8121 additions and 0 deletions

23
model/firma.go Normal file
View File

@ -0,0 +1,23 @@
package model
import "gorm.io/gorm"
type FirmaTyp int
const (
_ FirmaTyp = iota
Lieferant
Kunde
)
type Firma struct {
gorm.Model
FirmaTyp FirmaTyp `json:"firma_typ"`
Name string `json:"name"`
InternerName string `json:"interner_name"`
Slug string `gorm:"unique;not null;index" json:"slug"`
Branche string `json:"branche"`
Tochergesellschaften []*Firma `gorm:"foreignkey:ParentCompany" json:"tochergesellschaften"`
ParentCompany *uint `json:"parent_company"`
Ansprechpartner []*Ansprechpartner `gorm:"many2many:firma_ansprechpartner" json:"ansprechpartner"`
}