hezarfen_backend
Clone
https://git.tahinli.com/archive/hezarfen_backend.git
0 watching0 forksRust8.3 MiB6d68754Ahmet Kaan Gümüş2 months ago566 commits
| 1 | use Uuid; |
| 2 | |
| 3 | use cratenext_uuid; |
| 4 | use crateTimestamp; |
| 5 | use crateUserId; |
| 6 | use crate; |
| 7 | |
| 8 | /// Typed work-entry row id. A UUIDv7 minted by the process-wide monotonic |
| 9 | /// generator, so `id` order is mint order. |
| 10 | |
| 11 | |
| 12 | ; |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | /// One work stint of a staff member: server-stamped `check_in`, and |
| 43 | /// `check_out` once closed. The wall clock is read server-side only — a |
| 44 | /// client can never supply its own instants (managers correct closed entries |
| 45 | /// through an explicit endpoint instead). |
| 46 | /// |
| 47 | /// "At most one open stint per staff member" is no longer carried by a |
| 48 | /// deterministic key: it is a partial unique index on the table |
| 49 | /// (`work_entry_open`) over rows whose `check_out` is NULL, so the database |
| 50 | /// itself refuses a second check-in. |
| 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 | /// The one ordering refusal both the web handler's pre-flight and the db |
| 83 | /// layer's write-time guard owe for a corrected stint: the correction must |
| 84 | /// still order as *stored* — check-out at or after check-in. |
| 85 | pub |
| 86 | |
| 87 | |
| 88 | |
| 89 | |
| 90 |