Added create contact ednpoint

This commit is contained in:
Nedim
2023-10-06 10:47:26 +02:00
parent f32b5d5748
commit 314abe0462
15 changed files with 1278 additions and 146 deletions

View File

@@ -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"`
}