Upstream sync
This commit is contained in:
@@ -1,23 +1,24 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"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"`
|
||||
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 {
|
||||
gorm.Model
|
||||
Name string `json:"name"`
|
||||
Address string `json:"address"`
|
||||
Email string `json:"email"`
|
||||
Phone string `json:"phone"`
|
||||
Users []User `json:"users"`
|
||||
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"`
|
||||
}
|
||||
|
||||
@@ -26,7 +27,6 @@ type CompanyShortResponse struct {
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
|
||||
func (Company) Update() (bool, error) {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user