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

29
model/ansprechpartner.go Normal file
View File

@ -0,0 +1,29 @@
package model
import "gorm.io/gorm"
type Gender int
const (
_ Gender = iota
Male
Female
Other
)
type Ansprechpartner struct {
gorm.Model
ImageURL string `json:"image_url"`
Title string `json:"title"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
LastTitle string `json:"last_title"`
EMail string `json:"e_mail" gorm:"email;unique;not null"`
Phone string `json:"phone"`
Mobile string `json:"mobile"`
Notes string `json:"notes"`
Description string `json:"description"`
Active bool `json:"active"`
Gender Gender `json:"gender"`
Firmen []*Firma `json:"firmen" gorm:"many2many:firma_ansprechpartner"`
}

7
model/dokument.go Normal file
View File

@ -0,0 +1,7 @@
package model
import "gorm.io/gorm"
type Dokument struct {
gorm.Model
}

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"`
}

View File

@ -0,0 +1,16 @@
package model
import (
"gorm.io/gorm"
)
type FirmaAnsprechpartner struct {
gorm.Model
AnsprechpartnerId uint `gorm:"unique"`
FirmaId uint `gorm:"unique"`
Role string
}
func (FirmaAnsprechpartner) TableName() string {
return "firma_ansprechpartner"
}

7
model/kalender.go Normal file
View File

@ -0,0 +1,7 @@
package model
import "gorm.io/gorm"
type Kalender struct {
gorm.Model
}

7
model/kalendereintrag.go Normal file
View File

@ -0,0 +1,7 @@
package model
import "gorm.io/gorm"
type Kalendereintrag struct {
gorm.Model
}

7
model/kostenstelle.go Normal file
View File

@ -0,0 +1,7 @@
package model
import "gorm.io/gorm"
type Kostenstelle struct {
gorm.Model
}

7
model/lager.go Normal file
View File

@ -0,0 +1,7 @@
package model
import "gorm.io/gorm"
type Lager struct {
gorm.Model
}

7
model/lagerplatz.go Normal file
View File

@ -0,0 +1,7 @@
package model
import "gorm.io/gorm"
type Lagerplatz struct {
gorm.Model
}

7
model/material.go Normal file
View File

@ -0,0 +1,7 @@
package model
import "gorm.io/gorm"
type Material struct {
gorm.Model
}

7
model/nachricht.go Normal file
View File

@ -0,0 +1,7 @@
package model
import "gorm.io/gorm"
type Nachricht struct {
gorm.Model
}

7
model/projekt.go Normal file
View File

@ -0,0 +1,7 @@
package model
import "gorm.io/gorm"
type Projekt struct {
gorm.Model
}

7
model/rechnung.go Normal file
View File

@ -0,0 +1,7 @@
package model
import "gorm.io/gorm"
type Rechnung struct {
gorm.Model
}

View File

@ -0,0 +1,7 @@
package model
import "gorm.io/gorm"
type Rechnungsposition struct {
gorm.Model
}

7
model/scanobject.go Normal file
View File

@ -0,0 +1,7 @@
package model
import "gorm.io/gorm"
type Scanobject struct {
gorm.Model
}

7
model/user.go Normal file
View File

@ -0,0 +1,7 @@
package model
import "gorm.io/gorm"
type User struct {
gorm.Model
}

7
model/zahlung.go Normal file
View File

@ -0,0 +1,7 @@
package model
import "gorm.io/gorm"
type Zahlung struct {
gorm.Model
}