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,14 +1,23 @@
package models
import "github.com/jinzhu/gorm"
import (
"database/sql"
"time"
"github.com/jinzhu/gorm"
)
type User struct {
gorm.Model
Username string
Password string
Email string
Avatar string
CompanyID uint
ID uint `json:"id" gorm:"primaryKey"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
DeletedAt sql.NullTime `json:"deletedAt" gorm:"index"`
Username string `json:"username"`
Password string `json:"password"`
Email string `json:"email"`
Avatar string `json:"avatar"`
CompanyID uint `json:"companyId"`
}
func (User) Update() (bool, error) {