Refactor testing framework to utilize Ginkgo for unit tests and introduce a new test-all target for running both unit and integration tests. Update README and Taskfile to reflect changes in test execution commands and clarify dependencies. Migrate domain models to a new model package for better separation of concerns.

This commit is contained in:
windyboy
2025-11-16 09:58:49 +08:00
parent a96cb8a40b
commit 487a0acb48
18 changed files with 244 additions and 164 deletions
+7 -7
View File
@@ -1,13 +1,13 @@
package mapper
import "caatsm/internal/domain"
import "caatsm/internal/model"
// Mapper defines the interface for mapping between domain models and database models
// Mapper defines the interface for mapping between pipeline models and database models
type Mapper interface {
// ToDBRow converts a domain.ParsedMessage to a database row representation
ToDBRow(msg *domain.ParsedMessage) ([]interface{}, error)
// FromDBRow converts a database row to a domain.ParsedMessage
FromDBRow(row []interface{}) (*domain.ParsedMessage, error)
// ToDBRow converts a ParsedTelegram to a database row representation
ToDBRow(msg *model.ParsedTelegram) ([]interface{}, error)
// FromDBRow converts a database row to a ParsedTelegram
FromDBRow(row []interface{}) (*model.ParsedTelegram, error)
}