Typy rout

index - vraci seznam zaznamu, filtruje podle query parametru
show - vraci jeden zaznam podle id
create - vytvori zaznam, body jako json hash sloupcu
update - aktualizuje zaznam, body jako json hash sloupcu ke zmene, nezadane zustavaji
delete - smaze zaznam

CRUD routy

artikly

get /articles - index
post /articles - create
get /articles/:id - show
put /articles/:id - update
delete /articles/:id - delete

skupiny

get /groups - index
post /groups - create
get /groups/:id - show
put /groups/:id - update
delete /groups/:id - delete

domy

get /buildings - index
post /buildings - create
get /buildings/:id - show
put /buildings/:id - update
delete /buildings/:id - delete

rady

get /orders - index
post /orders - create
get /orders/:id - show
put /orders/:id - update
delete /orders/:id - delete

typy podminek

get /condition types - index
post /condition types - create
get /condition types/:id - show
put /condition types/:id - update
delete /condition types/:id - delete

typy odmen

get /reward_types - index
post /reward_types - create
get /reward_types/:id - show
put /reward_types/:id - update
delete /reward_types/:id - delete

zpusoby odmen

get /reward_manners - index
post /reward_manners - create
get /reward_manners/:id - show
put /reward_manners/:id - update
delete /reward_manners/:id - delete

akce

get /actions - index
post /actions - create
get /actions/:id - show
put /actions/:id - update
delete /actions/:id - delete

JOIN routy

artikly ve skupinach

get /groups/with_articles - vraci seznam skupin s pridanym fieldem article_ids
get /groups/:group_id/with_articles - vraci skupinu s pridanym fieldem article_ids
get /groups/:group_id/articles - vraci seznam artiklu ve skupine
post /groups/:group_id/articles/:article_id - pridava artikl do skupiny
delete /groups/:group_id/articles/:article_id - odebira artikl ze skupiny
get /groups/:group_id/article_ids - vraci seznam id artiklu ve skupine
post /groups/:group_id/article_ids - hromadne nastavuje artikly ve skupine - body jako seznam id

domy akci

get /actions/with_buildings - vraci seznam akci s pridanym fieldem building_ids
get /actions/:action_id/with_buildings - vraci akci s pridanym fieldem building_ids
get /actions/:action_id/buildings - vraci seznam domu akce
post /actions/:action_id/buildings/:building_id - pridava dum do domu akce
delete /actions/:action_id/buildings/:building_id - odebira dum z domu akce
get /actions/:action_id/building_ids - vraci seznam id domu akce
post /actions/:action_id/building_ids - hromadne nastavuje domy akce - body jako seznam id

akce domů

get /buildings/with_actions - vraci seznam domu s pridanym fieldem action_ids
get /buildings/:building_id/with_actions - vraci dum s pridanym fieldem action_ids
get /buildings/:building_id/actions - vraci seznam akci platnych v dome
post /buildings/:building_id/actions/:action_id - pridava akci do akci platnych v dome
delete /buildings/:building_id/actions/:action_id - odebira akci z platnych v dome
get /buildings/:building_id/action_ids - vraci seznam id akci platnych v dome
post /buildings/:building_id/action_ids - hromadne nastavuje akce platne v dome - body jako seznam id