models.go 514 B

123456789101112131415161718192021222324252627
  1. package main
  2. type ViewData struct {
  3. Title string
  4. PrinterNames []string
  5. CartridgeNames []string
  6. }
  7. type Output struct {
  8. PrinterName string
  9. Cartridges []string
  10. }
  11. type Printers struct {
  12. ID uint `gorm:"AUTO_INCREMENT;type:integer"`
  13. Name string `gorm:"type:text"`
  14. }
  15. type Cartridges struct {
  16. ID uint `gorm:"AUTO_INCREMENT;type:integer"`
  17. Name string `gorm:"type:text"`
  18. }
  19. type Cartridgeofprinter struct {
  20. Cartridge_Id uint `gorm:"type:integer"`
  21. Printer_Id uint `gorm:"type:integer"`
  22. }