Added create contact ednpoint
This commit is contained in:
@@ -1,20 +1,29 @@
|
||||
package models
|
||||
|
||||
import "github.com/jinzhu/gorm"
|
||||
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
|
||||
Address string
|
||||
Email string
|
||||
Phone string
|
||||
Users []User
|
||||
Devices []Device
|
||||
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
|
||||
Name string
|
||||
ID int `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user