Added Contacts, Essence Point to Models package. Next step migrations for this objects into psql.
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
package models
|
||||||
|
|
||||||
|
import "github.com/google/uuid"
|
||||||
|
|
||||||
|
type Contact struct {
|
||||||
|
Id uuid.UUID `json:"id" gorm:"type:uuid;primaryKey;unique;AutoIncrement:false"`
|
||||||
|
Email string `json:"email" gorm:"type:string"`
|
||||||
|
Phone string `json:"phone" gorm:"type:string"`
|
||||||
|
Address string `json:"address" gorm:"type:string"`
|
||||||
|
Point Point `json:"point" gorm:"type:struct"`
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package models
|
||||||
|
|
||||||
|
import "github.com/google/uuid"
|
||||||
|
|
||||||
|
type Essence struct {
|
||||||
|
Id uuid.UUID `json:"id" gorm:"type:uuid;primaryKey;unique;AutoIncrement:false"`
|
||||||
|
Name string `json:"name" gorm:"type:string"`
|
||||||
|
Type string `json:"type" gorm:"type:string"`
|
||||||
|
Contact Contact `json:"contact" gorm:"type:struct"`
|
||||||
|
ShortDescription string `json:"shortDesc" gorm:"type:string"`
|
||||||
|
Description string `json:"description" gorm:"type:string"`
|
||||||
|
AverageBill string `json`
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package models
|
||||||
|
|
||||||
|
import "github.com/google/uuid"
|
||||||
|
|
||||||
|
type Point struct {
|
||||||
|
Id uuid.UUID `json:"id" gorm:"type:uuid;primaryKey;unique;AutoIncrement:false"`
|
||||||
|
Latitude int64 `json:"latitude" gorm:"type:int64"`
|
||||||
|
Longitude int64 `json:"longitude" gorm:"type:int64"`
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user