models

package
v0.0.0-...-115b5aa Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Audit

type Audit struct {
	gorm.Model
	To           string
	FromUser     uint `gorm:"not null"`
	TemplateName string
	TemplateID   uint
}

type Auth

type Auth struct {
	gorm.Model
	Uuid   string `gorm:"unique;not null"`
	UserID uint
	User   User `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

type Client

type Client struct {
	gorm.Model
	Name       string `json:"name" gorm:"type:varchar(50)"`
	MailId     string `json:"mailID" valid:"email,required" gorm:"type:varchar(50);not null;unique_index:idx_first_second"`
	Phone      int    `json:"phone" valid:"required" gorm:"type:bigint;not null"`
	Preference string `json:"preference" gorm:"type:varchar(50)"`
	UserID     uint   `gorm:"unique_index:idx_first_second"`
	User       User   `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

type DeleteJob

type DeleteJob struct {
	JobID uint `json:"jobId"`
}

type DeleteTemplateInput

type DeleteTemplateInput struct {
	Key          string `json:"key" valid:"required"`
	ClientMailId string `json:"clientMailID" valid:"email,required"`
}

type Field

type Field struct {
	gorm.Model
	Key      string `json:"key" valid:"required" gorm:"type:varchar(50);not null;unique_index:idx_field"`
	Value    string `json:"value" valid:"required" gorm:"type:varchar(50);not null"`
	ClientID uint   `gorm:"unique_index:idx_field"`
	Client   Client `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

type ForgotPassword

type ForgotPassword struct {
	Email string `json:"email" valid:"email"`
}

type ForgotPasswordPayload

type ForgotPasswordPayload struct {
	To      string
	From    string
	Text    string
	Subject string
}

type Job

type Job struct {
	gorm.Model
	Type       string // daily, weekly, monthly
	Status     string
	TemplateID uint   `gorm:"unique_index:idx_job"`
	To         string `gorm:"unique_index:idx_job"`
	From       string
	ClientID   uint
	Client     Client `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

type KafkaPayload

type KafkaPayload struct {
	From    string `json:"from"`
	To      string `json:"to"`
	Text    string `json:"text"`
	Subject string `json:"subject"`
}

type LoginInput

type LoginInput struct {
	Email    string `json:"email" valid:"email"`
	Password string `json:"password" valid:"required"`
}

type NewPassword

type NewPassword struct {
	Password string `json:"password"`
}

type SendMailInput

type SendMailInput struct {
	TemplateId uint `json:"templateId"`
	ClientId   uint `json:"clientId"`
}

type SignupInput

type SignupInput struct {
	Email           string `json:"email" valid:"email"`
	Role            string `json:"role" valid:"required"`
	Password        string `json:"password" valid:"required"`
	ConfirmPassword string `json:"confirm_password" valid:"required"`
}

type SubscriptionInput

type SubscriptionInput struct {
	SubscriptionType string `json:"subscriptionType"`
	PaymentType      string `json:"paymentType"`
}

type SwaggerClient

type SwaggerClient struct {
	Name       string `json:"name"`
	MailId     string `json:"mailID"`
	Phone      int    `json:"phone"`
	Preference string `json:"preference"`
}

models for swagger definition

type SwaggerTemplate

type SwaggerTemplate struct {
	Name    string `json:"name"`
	Subject string `json:"subject"`
	Body    string `json:"body"`
}

type Template

type Template struct {
	gorm.Model
	Name    string `json:"name" gorm:"type:varchar(50);unique;not null"`
	Subject string `json:"subject" gorm:"type:varchar(50)"`
	Body    string `json:"body" gorm:"type:varchar(10000)"`
	UserID  uint
	User    User `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE;"`
}

type UpdatePassword

type UpdatePassword struct {
	Password string `json:"password" valid:"required"`
}

type User

type User struct {
	gorm.Model
	Name                string `json:"email" gorm:"unique;not null"`
	Password            string `json:"password" gorm:"not null"`
	Role                string `json:"role" gorm:"not null"`
	Subscription        string `gorm:"type:text"`
	NotificationCounter int    `gorm:"type:int"`
}

type VariableTemplateInput

type VariableTemplateInput struct {
	Key          string `json:"key" valid:"required"`
	Value        string `json:"value" valid:"required"`
	ClientMailId string `json:"clientMailID" valid:"email,required"`
}

Jump to

Keyboard shortcuts

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