riya_business_travel_8.0.0_.../pkg/models/star.go
venbatechnologies@gmail.com 565484c22d Modified initial commit
2021-07-05 14:17:23 +05:30

41 lines
601 B
Go

package models
import "errors"
var ErrCommandValidationFailed = errors.New("command missing required fields")
type Star struct {
Id int64
UserId int64
DashboardId int64
}
// ----------------------
// COMMANDS
type StarDashboardCommand struct {
UserId int64
DashboardId int64
}
type UnstarDashboardCommand struct {
UserId int64
DashboardId int64
}
// ---------------------
// QUERIES
type GetUserStarsQuery struct {
UserId int64
Result map[int64]bool // dashboard ids
}
type IsStarredByUserQuery struct {
UserId int64
DashboardId int64
Result bool
}