models

package
v0.0.0-...-a35cb54 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2019 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	ID        uuid.UUID `gorm:"type:uuid;primary_key"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt *time.Time
}

Base : gorm.Model definition

func (*Base) BeforeCreate

func (base *Base) BeforeCreate(scope *gorm.Scope) error

BeforeCreate will set a UUID rather than numeric ID.

type Email

type Email struct {
	gorm.Model
	Status      string             `grom:"type:varchar(32);not null"`
	TemplateID  string             `grom:"type:varchar(256)"`
	ToEmai      string             `grom:"type:varchar(256);not null"`
	FromEmail   string             `grom:"type:varchar(256);not null"`
	ToName      string             `grom:"type:varchar(256);not null"`
	FromName    string             `grom:"type:varchar(256);not null"`
	Subject     string             `grom:"type:varchar(256)"`
	Message     string             `grom:"type:varchar"`
	DynamicData *map[string]string `grom:"type:json"`
}

Email : Base with injected fields `ID`, `CreatedAt`, `UpdatedAt`

func (Email) SendSendgridEmail

func (e Email) SendSendgridEmail() error

SendSendgridEmail : sends a email

type Response

type Response struct {
	Status string
	// contains filtered or unexported fields
}

Response : sample request response

type SMS

type SMS struct {
	gorm.Model
	Status     string `grom:"type:varchar(32);not null"`
	ToNumber   string `grom:"type:varchar(256);not null"`
	FromNumber string `grom:"type:varchar(256);not null"`
	Message    string `grom:"type:varchar(256);not null"`
	TwilioID   string `grom:"type:varchar(256)"`
}

SMS : Base with injected fields `ID`, `CreatedAt`, `UpdatedAt`

func (SMS) SendTwilioSMS

func (s SMS) SendTwilioSMS() error

SendTwilioSMS : sends a sms

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL