generated from PenaSide/GolangTemplate
24 lines
515 B
Go
24 lines
515 B
Go
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
|
|
UserID string
|
|
}
|
|
|
|
func (receiver *GetHistories) BSON() bson.M {
|
|
query := bson.M{
|
|
fields.History.IsDeleted: false,
|
|
fields.History.Type: *receiver.Type,
|
|
fields.History.UserID: receiver.UserID,
|
|
}
|
|
|
|
return query
|
|
}
|