🧹 chore: split meal_attendance, meal_ledger, menu, menu_dish, dietary_profile into domain/db/service layers
- db/: menu (publish/read/find/list/CAS cap update/cascading delete +
bump_menu_and_write), menu_dish (create/read/listings/count/patch/delete),
meal_attendance (mark/list_for_menu/list_for_student), meal_ledger
(append/read/price_snapshot/list_for_student/balance_of + KindTotal),
dietary_profile (read/tags_of/save). Bodies byte-identical; entity
fields pub(crate) for cross-layer construction (exam precedent).
- service/: menu owns MENU_LOCK (multi-call count-then-write span) and
every dish write (add_dish with the MAX_DISHES_PER_MENU gate,
update_dish/delete_dish) plus menu/dish read pass-throughs;
meal_ledger owns charge_booking/reverse_booking/credit orchestration;
meal_attendance and dietary_profile are read-through pass-throughs.
- domain/: pure remnants only — ids, newtypes, getters, sign convention,
charge_for/reversal_for row builders, conflicts; ULID IDS minters stay;
persistence tests ride with their fns into db/.
- web/meals.rs: handlers call service::* only; MENU_LOCK leases and the
dish-cap gate moved out; validation order preserved.
- re-pointed merged callers (service/meal_booking, db/meal_booking,
db/exam_attempt doc link) and test imports (integration, regress_meals).
cargo check --all-targets clean; cargo test --lib 577 passed 0 failed;
cargo test --test regress_meals 18 passed 0 failed.