Files
old-backend/models/company.go
2023-10-09 08:33:51 +02:00

39 lines
774 B
Go

package models
import (
"time"
"github.com/jinzhu/gorm"
)
type BaseModel struct {
ID uint `json:"id" gorm:"primaryKey"`
CreatedAt time.Time `json:"createdAt" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updatedAt" gorm:"autoUpdateTime"`
}
type Company struct {
gorm.Model
Name string `json:"name"`
Address string `json:"address"`
Email string `json:"email"`
Phone string `json:"phone"`
Users []User `json:"users"`
Devices []Device `json:"devices"`
}
type CompanyShortResponse struct {
ID int `json:"id"`
Name string `json:"name"`
}
func (Company) Update() (bool, error) {
return false, nil
}
func (Company) Create() (bool, error) {
return false, nil
}
func (Company) Delete() (bool, error) {
return false, nil
}