Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) Delete(name string) error
- func (c *Client) FindByName(query string, limit int) ([]Client, error)
- func (c *Client) GetByID(id int) (*Client, error)
- func (c *Client) List() ([]Client, error)
- func (c *Client) Save() error
- func (c *Client) SaveJSON(payload map[string]interface{}) error
- func (c *Client) Update(payload map[string]interface{}) error
- func (c *Client) With(name, description, email, phone string) *Client
- type Social
Constants ¶
This section is empty.
Variables ¶
View Source
var (
TableName = "clients"
)
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { ID uint `json:"id" gorm:"primarykey"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt gorm.DeletedAt `json:"deleted_at" gorm:"index"` Name string `json:"name"` Description string `json:"description"` Email string `json:"email"` Phone string `json:"phone"` Social Social `gorm:"embedded;embeddedPrefix:social_" mapstructure:",squash"` // contains filtered or unexported fields }
func (*Client) FindByName ¶ added in v0.10.0
type Social ¶ added in v0.10.0
type Social struct { Website string `json:"website" mapstructure:"social_website"` Instagram string `json:"instagram" mapstructure:"social_instagram"` Twitter string `json:"twitter" mapstructure:"social_twitter"` Facebook string `json:"facebook" mapstructure:"social_facebook"` Linkedin string `json:"linkedin" mapstructure:"social_linkedin"` }
Click to show internal directories.
Click to hide internal directories.