customer/internal/dto/get_histories.go

24 lines
515 B
Go
Raw Normal View History

2023-09-14 10:02:32 +00:00
package dto
import (
"go.mongodb.org/mongo-driver/bson"
"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/fields"
"penahub.gitlab.yandexcloud.net/pena-services/customer/internal/models"
)
type GetHistories struct {
Pagination *models.Pagination
Type *string
2023-11-20 22:07:13 +00:00
UserID string
2023-09-14 10:02:32 +00:00
}
func (receiver *GetHistories) BSON() bson.M {
query := bson.M{
fields.History.IsDeleted: false,
2023-09-14 22:23:20 +00:00
fields.History.Type: *receiver.Type,
2023-11-20 22:07:13 +00:00
fields.History.UserID: receiver.UserID,
2023-09-14 10:02:32 +00:00
}
return query
}