Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Customer ¶
type Customer struct { CPF string `gorm:"primaryKey;type:varchar(11)" json:"cpf"` Name string `json:"name"` Email string `gorm:"uniqueIndex" json:"email"` Phone string `json:"phone"` Job string `json:"job"` BirthDate string `json:"birth_date"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Tags []*tagModel.Tag `gorm:"many2many:customer_tags;ForeignKey:cpf;References:id;onDelete:CASCADE" json:"tags"` AddressID uuid.UUID `gorm:"column:address_id;not null" json:"-"` Address CustomerAddress `gorm:"foreignKey:AddressID" json:"address"` }
type CustomerAddress ¶
type CustomerAddress struct { ID uuid.UUID `gorm:"primarykey" json:"id"` CEP string `gorm:"not null" json:"cep"` City string `gorm:"not null" json:"city"` Number string `gorm:"not null" json:"number"` Estate string `gorm:"not null" json:"estate"` StreetName string `json:"street_name"` Complement string `json:"complement"` Neighborhood string `json:"neighborhood"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Click to show internal directories.
Click to hide internal directories.