controller

package
v0.0.0-...-53e80a7 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateCreateRequest

func ValidateCreateRequest(dirtyData *OrderIncidentCreateRequestIDO) error

func ValidateUpdateRequest

func ValidateUpdateRequest(dirtyData *OrderIncidentUpdateRequestIDO) error

Types

type OrderIncidentController

OrderIncidentController Interface for orderincident business logic controller.

func NewController

func NewController(
	appCfg *config.Conf,
	loggerp *slog.Logger,
	uuidp uuid.Provider,
	s3 s3_storage.S3Storager,
	passwordp password.Provider,
	kmux kmutex.Provider,
	client *mongo.Client,
	temailer templatedemailer.TemplatedEmailer,
	usr_storer user_s.UserStorer,
	t_storer t_s.OrderIncidentStorer,
	c_storer c_s.CustomerStorer,
	a_ctorer a_c.AssociateStorer,
	o_storer o_s.OrderStorer,
	ti_storer ti_s.TaskItemStorer,
	com_storer com_s.CommentStorer,
	attch_storer attachment_s.AttachmentStorer,
) OrderIncidentController

type OrderIncidentControllerImpl

type OrderIncidentControllerImpl struct {
	Config              *config.Conf
	Logger              *slog.Logger
	UUID                uuid.Provider
	S3                  s3_storage.S3Storager
	Password            password.Provider
	Kmutex              kmutex.Provider
	DbClient            *mongo.Client
	UserStorer          user_s.UserStorer
	OrderIncidentStorer t_s.OrderIncidentStorer
	CustomerStorer      c_s.CustomerStorer
	AssociateStorer     a_c.AssociateStorer
	OrderStorer         o_s.OrderStorer
	TaskItemStorer      ti_s.TaskItemStorer
	CommentStorer       com_s.CommentStorer
	AttachmentStorer    attachment_s.AttachmentStorer
	TemplatedEmailer    templatedemailer.TemplatedEmailer
}

func (*OrderIncidentControllerImpl) ArchiveByID

func (*OrderIncidentControllerImpl) Create

func (*OrderIncidentControllerImpl) CreateComment

func (*OrderIncidentControllerImpl) DeleteByID

func (*OrderIncidentControllerImpl) GetByID

func (*OrderIncidentControllerImpl) UpdateByID

type OrderIncidentCreateRequestIDO

type OrderIncidentCreateRequestIDO struct {
	OrderID            string             `bson:"order_id" json:"order_id"`
	FormattedOrderID   primitive.ObjectID `bson:"order_id"`
	FormattedOrderWJID uint64             `bson:"order_id"`
	StartDate          time.Time          `bson:"start_date" json:"start_date"`
	Initiator          int8               `bson:"initiator" json:"initiator"`
	Title              string             `bson:"title" json:"title"`
	Description        string             `bson:"description" json:"description"`
	ClosingReason      int8               `bson:"closing_reason" json:"closing_reason"`
	ClosingReasonOther string             `bson:"closing_reason_other" json:"closing_reason_other"`
}

type OrderIncidentOperationCreateAttachmentRequest

type OrderIncidentOperationCreateAttachmentRequest struct {
	OrderIncidentID primitive.ObjectID `bson:"order_incident_id" json:"order_incident_id"`
	Title           string
	Description     string
	FileName        string
	FileType        string
	File            multipart.File
}

type OrderIncidentOperationCreateCommentRequest

type OrderIncidentOperationCreateCommentRequest struct {
	OrderIncidentID primitive.ObjectID `bson:"order_incident_id" json:"order_incident_id"`
	Content         string             `bson:"content" json:"content"`
}

type OrderIncidentUpdateRequestIDO

type OrderIncidentUpdateRequestIDO struct {
	ID                 primitive.ObjectID `bson:"id" json:"id"`
	StartDate          time.Time          `bson:"start_date" json:"start_date"`
	Initiator          int8               `bson:"initiator" json:"initiator"`
	Title              string             `bson:"title" json:"title"`
	Description        string             `bson:"description" json:"description"`
	ClosingReason      int8               `bson:"closing_reason" json:"closing_reason"`
	ClosingReasonOther string             `bson:"closing_reason_other" json:"closing_reason_other"`
}

Jump to

Keyboard shortcuts

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