Files
tm_back/internal/notification/form.go
T
n.nakhostin 9037cb5917 Refactor Notification Management and Enhance Customer Features
- Updated the notification handling logic to utilize a new SDK for sending notifications, improving the flexibility and scalability of the notification system.
- Introduced new methods in the notification service for sending notifications to users and customers based on various target audience types, enhancing the notification delivery capabilities.
- Added a new endpoint to assign companies to a customer, improving customer management functionalities.
- Refactored the customer entity and forms to replace 'CompanyIDs' with 'Companies', ensuring consistency across the data model.
- Enhanced API documentation with Swagger comments for the new endpoint and updated notification structures, ensuring clarity for API consumers.
2025-09-20 16:54:51 +03:30

27 lines
1.2 KiB
Go

package notification
// CreateRequest represents the request to create a notification
type NotificationRequest struct {
Recipient []string `json:"recipient"`
Tender string `json:"tender" valid:"optional,stringlength(1|100)"`
Channels []DeliveryChannel `json:"channels" valid:"required"`
Type NotificationType `json:"type" valid:"required"`
Priority NotificationPriority `json:"priority" valid:"required"`
Target TargetAudienceType `json:"target" valid:"required"`
Title string `json:"title" valid:"required"`
Description string `json:"description" valid:"required"`
Link *string `json:"link" valid:"optional,url"`
ScheduleAt int64 `json:"schedule_at" valid:"optional"`
}
// SearchForm represents the form for searching notifications
type SearchForm struct {
Search *string `query:"q" valid:"optional"`
Status NotificationStatus `query:"status" valid:"optional"`
SortBy *string `query:"sort_by" valid:"optional"`
SortOrder *string `query:"sort_order" valid:"optional"`
Limit *int `query:"limit" valid:"optional"`
Offset *int `query:"offset" valid:"optional"`
}