Files
old-backend/models/company.go
2023-10-13 11:48:14 +02:00

39 lines
795 B
Go

package models
import (
"database/sql"
"time"
)
type BaseModel struct {
ID uint `json:"id" gorm:"primaryKey"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DeletedAt sql.NullTime `json:"deletedAt,omitempty" gorm:"index"`
}
type Company struct {
BaseModel
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
}