hezarfen_backend
Clone
https://git.tahinli.com/Hezarfen/hezarfen_backend.git
0 watching0 forksRust8.3 MiB6d68754Ahmet Kaan Gümüş2 months ago566 commits
| 1 | //! The photo of an offered solution — one optional image row per solution, |
| 2 | //! the single-slot spelling of [`crate::domain::question_image`]'s |
| 3 | //! child-table shape. The row carries metadata only; the bytes live on disk |
| 4 | //! under [`crate::config::Config::files_path`] in a file named by `file` — a |
| 5 | //! fresh server-generated id per upload, so a replace never overwrites bytes |
| 6 | //! in place. The solution row itself carries no image columns; the child row |
| 7 | //! is the whole photo. The writes ride the parent's own transactions in |
| 8 | //! [`crate::db::solution`] (unconditional — solutions are unmoderated); the |
| 9 | //! reads live in [`crate::db::solution_image`]; the web layer owns the blob |
| 10 | //! I/O and its ordering (new blob before row, row before old blob). |
| 11 | |
| 12 | use crateFileContentType; |
| 13 | use crateSolutionId; |
| 14 | |
| 15 | /// One solution's photo row. `solution` is the primary key — one image per |
| 16 | /// solution by construction, and a replace is a plain upsert. |
| 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 |