hezarfen_backend
Clone
https://git.tahinli.com/archive/hezarfen_backend.git
0 watching0 forksRust8.3 MiB6d68754Ahmet Kaan Gümüş2 months ago566 commits
| 1 | //! A student's stint in a class, and the enrollments that place implies. |
| 2 | //! |
| 3 | //! A history table: `left_at` NULL is the live stint, and the partial unique |
| 4 | //! index `(class, app_user) WHERE left_at IS NULL` keeps one live stint per |
| 5 | //! pair while preserving rejoin history (a student who leaves and comes back |
| 6 | //! has two rows). Both writes are one call into [`crate::db::class_pump`]: |
| 7 | //! adding a member and attaching a course to the class are the same pump seen |
| 8 | //! from its two ends. The refusals-to-errors policy and the detach live in |
| 9 | //! [`crate::service::class_member`]; the roster reads in |
| 10 | //! [`crate::db::class_member`] — this file is the row shape and its id. |
| 11 | |
| 12 | use crateClassGroupId; |
| 13 | use cratenext_uuid; |
| 14 | use crateTimestamp; |
| 15 | use crateUserId; |
| 16 | |
| 17 | /// The identity of one class-member stunt. A UUIDv7 minted by the |
| 18 | /// process-wide monotonic generator, so a class's roster lists in join order. |
| 19 | |
| 20 | |
| 21 | ; |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | /// One student's stint in one class. `added_by` is who put them there; |
| 47 | /// `source_class_group` names the section a rollover copied them from (absent |
| 48 | /// for a hand-added member). |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | |
| 94 | |
| 95 | |
| 96 | |
| 97 |