Commit 9fff86e
authored
Feat/328 model doc comments (#354)
* feat(contract): standardize event name trimming (#326)
- Add `name` field to `EventRegistrationArgs` and `EventInfo` structs
- Implement `trim_string` helper to strip leading/trailing ASCII whitespace
- Apply trimming to event name in `register_event` before persisting
- Add `name` field to local `EventInfo` copy in ticket_payment contract
- Add `test_register_event_name_trimming` test with intentionally messy names
- Update all existing test fixtures to include the new `name` field
* chore(server): add .dockerignore to reduce Docker build context
Excludes target/, .env files, .git/, editor artifacts, and other
non-essential files from the Docker build context.
- target/ is the primary source of bloat (can be GBs in Rust projects)
- .env files must never be baked into images
- .git/ metadata (~30MB) is not needed at build time
- Docs, scripts, and OS artifacts excluded for a leaner context
* docs(server): add doc comments to model structs (#328)
Add /// and //! doc comments to all structs and fields in
server/src/models/ to improve database layer understandability.
- User: documents role distinction from Organizer
- Organizer: documents ownership relationship to Events
- Event: documents FK to Organizer and cascade behaviour
- TicketTier: documents quantity tracking semantics
- Ticket: documents status lifecycle (active/used/cancelled)
and QR code generation timing
- Transaction: documents status lifecycle (pending/completed/failed)
and Stellar hash usage for on-chain payments
- mod.rs: adds module-level doc with entity relationship diagram1 parent 816e60e commit 9fff86e
33 files changed
Lines changed: 650 additions & 0 deletions
File tree
- contract/contracts
- event_registry
- src
- test_snapshots/test
- ticket_payment/src
- server
- src/models
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
362 | 365 | | |
363 | 366 | | |
| 367 | + | |
364 | 368 | | |
365 | 369 | | |
366 | 370 | | |
| |||
1863 | 1867 | | |
1864 | 1868 | | |
1865 | 1869 | | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
1866 | 1913 | | |
1867 | 1914 | | |
1868 | 1915 | | |
| |||
0 commit comments