entity

package
Version: v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseEntity

type BaseEntity struct {
	CreatedBy string         `json:"createdBy,omitempty" gorm:"column:sys_created_by;size:255" `
	CreatedAt *time.Time     `json:"createdAt,omitempty" gorm:"column:sys_created_at" sql:"index"`
	UpdatedBy string         `json:"updatedBy,omitempty" gorm:"column:sys_updated_by;size:255"`
	UpdatedAt *time.Time     `json:"updatedAt,omitempty" gorm:"column:sys_updated_at" sql:"index"`
	DeletedBy string         `json:"deletedBy,omitempty" gorm:"column:sys_deleted_by;size:255"`
	DeletedAt gorm.DeletedAt `json:"deletedAt,omitempty" gorm:"column:deleted_at;index:idx_delete_at" sql:"index"`
}

BaseEntity base type

type Email

type Email struct {
	ID uint64 `json:"ID" gorm:"primary_key;column:id"`

	UUID       string        `json:"uuid" gorm:"column:uuid;size:255;unique;not null" sql:"index"`
	TemplateID uint64        `json:"templateID" gorm:"column:template_id;" sql:"index"`
	Template   EmailTemplate `json:"user" gorm:"ForeignKey:TemplateID;AssociationForeignKey:ID;"`

	From     string `json:"from" gorm:"column:from;size:255"`
	FromName string `json:"fromName" gorm:"column:from_name;size:255"`
	To       string `json:"to" gorm:"column:to;size:255"`
	ToName   string `json:"toName" gorm:"column:to_name;size:255"`
	CC       string `json:"cc" gorm:"column:cc;size:500"`
	BCC      string `json:"bcc" gorm:"column:bcc;size:500"`
	Subject  string `json:"subject" gorm:"column:subject;size:500"`
	Body     []byte `json:"body" gorm:"column:body;"`
	Status   string `json:"status" gorm:"column:status;size:100"`

	SentBy string `json:"sentBy" gorm:"column:sent_by;size:255"`

	BaseEntity
}

Email type

func (Email) TableName

func (t Email) TableName() string

TableName get real database table name

type EmailTemplate

type EmailTemplate struct {
	ID uint64 `json:"ID" gorm:"primary_key;column:id"`

	UUID             string `json:"uuid" gorm:"column:uuid;size:255;unique;not null" sql:"index"`
	Code             string `json:"code" gorm:"column:code;size:100;unique;not null" sql:"index"`
	Name             string `json:"name" gorm:"column:name;size:255;not null"`
	IsActive         bool   `json:"isActive" gorm:"column:is_active;index" sql:"index"`
	EmailFormat      string `json:"emailFormat" gorm:"column:email_format;size:10;not null"`
	DefaultVersionID uint64 `json:"defaultVersionID" gorm:"column:default_version_id;not null"`
	BaseEntity
}

EmailTemplate type

func (EmailTemplate) TableName

func (t EmailTemplate) TableName() string

TableName get real database table name

type EmailTemplateVersion

type EmailTemplateVersion struct {
	ID uint64 `json:"ID" gorm:"primary_key;column:id"`

	Version    string `json:"version" gorm:"column:version;size:100;index:idx_version,unique;not null" sql:"index"`
	SubjectTpl string `json:"subjectTpl" gorm:"column:subject_tpl;size:255;not null" `
	BodyTpl    string `json:"bodyTpl" gorm:"column:body_tpl"`

	EmailTemplateID uint64        `json:"emailTemplateID" gorm:"column:email_template_id;index:idx_version,unique;not null"`
	EmailTemplate   EmailTemplate `json:"emailTemplate" gorm:"ForeignKey:EmailTemplateID;AssociationForeignKey:ID;"`

	BaseEntity
}

EmailTemplateVersion type

func (EmailTemplateVersion) TableName

func (t EmailTemplateVersion) TableName() string

TableName get real database table name

Jump to

Keyboard shortcuts

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