1package models 2 3import "errors" 4 5var ErrCommandValidationFailed = errors.New("command missing required fields") 6 7type Star struct { 8 Id int64 9 UserId int64 10 DashboardId int64 11} 12 13// ---------------------- 14// COMMANDS 15 16type StarDashboardCommand struct { 17 UserId int64 18 DashboardId int64 19} 20 21type UnstarDashboardCommand struct { 22 UserId int64 23 DashboardId int64 24} 25 26// --------------------- 27// QUERIES 28 29type GetUserStarsQuery struct { 30 UserId int64 31 32 Result map[int64]bool // dashboard ids 33} 34 35type IsStarredByUserQuery struct { 36 UserId int64 37 DashboardId int64 38 39 Result bool 40} 41