Continued work on messages and notifications.

This commit is contained in:
2025-10-30 11:11:22 +00:00
parent b41e92629b
commit 8650b1fd63
14 changed files with 387 additions and 172 deletions

View File

@@ -0,0 +1,20 @@
package domainMessages
import (
"synlotto-website/internal/models"
)
type Message = models.Message
type CreateMessageInput struct {
RecipientID int64 `form:"to" binding:"required,username"`
Subject string `form:"subject" binding:"required,max=200"`
Body string `form:"body" binding:"required"`
}
type MessageService interface {
ListInbox(userID int64) ([]Message, error)
ListArchived(userID int64) ([]Message, error)
GetByID(userID, id int64) (*Message, error)
Create(userID int64, in CreateMessageInput) (int64, error)
}