hezarfen_backend
Clone
https://git.tahinli.com/archive/hezarfen_backend.git
0 watching0 forksRust8.3 MiB6d68754Ahmet Kaan Gümüş2 months ago566 commits
| 1 | //! Fee-plan doors for the web layer. Every write here is a single guarded |
| 2 | //! statement in [`crate::db::fee_plan`] — the assigned-plan freeze is the |
| 3 | //! store's own, decided as the write lands — so this module is thin |
| 4 | //! pass-throughs; the manager+ gate is the web layer's extractor. |
| 5 | |
| 6 | use crateDatabase; |
| 7 | use cratefee_plan; |
| 8 | use crate; |
| 9 | use crateUserId; |
| 10 | use crateAppError; |
| 11 | |
| 12 | /// Write a fee plan: a name and the installments it is paid in. Creating one |
| 13 | /// bills nobody — assigning it does. |
| 14 | pub async |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | /// The plan, for callers that only inspect it. |
| 24 | pub async |
| 25 | |
| 26 | |
| 27 | |
| 28 | /// Every plan, newest first. |
| 29 | pub async |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | /// Edit a plan's name and/or schedule. `Err(Conflict)` = refused, nothing was |
| 38 | /// written: somebody is already on the plan (and `Err(NotFound)` = the plan |
| 39 | /// is gone, so the refusal is not "assigned" but "deleted"). |
| 40 | pub async |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | /// Delete the plan while nobody is on it. `false` = refused: somebody is on |
| 50 | /// it, and a school's financial history keeps its references. |
| 51 | pub async |
| 52 | |
| 53 |