contact.go 399 B

123456789101112131415161718
  1. package models
  2. import (
  3. _ "github.com/go-playground/validator/v10"
  4. "gorm.io/gorm"
  5. )
  6. type Contact struct {
  7. gorm.Model
  8. Name string `json:"name"`
  9. Phone string `json:"phone"`
  10. Message string `json:"message"`
  11. }
  12. type ContactDto struct {
  13. Name string `json:"name" validate:"required"`
  14. Phone string `json:"phone" validate:"required"`
  15. Message string `json:"message" validate:"required"`
  16. }