hezarfen_backend
Clone
https://git.tahinli.com/archive/hezarfen_backend.git
0 watching0 forksRust8.3 MiB08aa13eAhmet Kaan Gümüş2 months ago378 commits
| 1 | //! The `fee_plan_assignment` table: the reads over placements. The row is |
| 2 | //! written by [`crate::service::fee_plan_assignment::assign`], whose claim |
| 3 | //! ([`crate::db::cap::claim_and_create`]) is the write that freezes the plan. |
| 4 | |
| 5 | use RecordId; |
| 6 | |
| 7 | use crateDatabase; |
| 8 | use cratePagedList; |
| 9 | use crateFeePlanId; |
| 10 | use crate; |
| 11 | use crateUserId; |
| 12 | use crateAppError; |
| 13 | |
| 14 | pub async |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | /// Who is on this plan, newest first. |
| 22 | pub async |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | /// Is anybody on this plan? A scan, and no longer a guard: the edit and |
| 38 | /// delete guards read the plan's own refcount, which no concurrent assign |
| 39 | /// can be behind. Kept because a *test* asserting the rows and the counter |
| 40 | /// agree is the only thing that would catch the counter drifting. |
| 41 | pub async |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | /// Which plans a student is on — one student may hold several. |
| 51 | pub async |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 |