# Input Data Parameters ## Database Schema ### Table: `users` | Column | Type | Nullable | Description | |--------|------|----------|-------------| | `id` | uuid | No | Primary key | | `email` | varchar(160) | No | User identifier | | `password_hash` | varchar(255) | No | SHA-384 hash (Base64) | | `hardware` | text | Yes | Raw hardware fingerprint | | `hardware_hash` | varchar(120) | Yes | Unused column (legacy) | | `role` | varchar(20) | No | Text enum: None, Operator, Validator, CompanionPC, Admin, ResourceUploader, ApiAdmin | | `user_config` | varchar(512) | Yes | JSON: `{ QueueOffsets: { AnnotationsOffset, AnnotationsConfirmOffset, AnnotationsCommandsOffset } }` | | `created_at` | timestamp | No | Default: `now()` | | `last_login` | timestamp | Yes | Updated on hardware check | | `is_enabled` | bool | No | Default: `true` | ## API Request Schemas ### POST /login ```json { "Email": "string", "Password": "string" } ``` ### POST /users ```json { "Email": "string", "Password": "string", "Role": "RoleEnum (int)" } ``` ### PUT /users/hardware/set ```json { "Email": "string", "Hardware": "string|null" } ``` ### PUT /users/queue-offsets/set ```json { "Email": "string", "Offsets": { "AnnotationsOffset": 0, "AnnotationsConfirmOffset": 0, "AnnotationsCommandsOffset": 0 } } ``` ### POST /resources/get/{dataFolder?} ```json { "Password": "string", "Hardware": "string", "FileName": "string" } ``` ### POST /resources/check ```json { "Hardware": "string" } ``` ### POST /resources/{dataFolder?} Multipart form data with `IFormFile` field. ## Configuration Sections ### ConnectionStrings ```json { "AzaionDb": "Host=...;Database=azaion;Username=azaion_reader;Password=...", "AzaionDbAdmin": "Host=...;Database=azaion;Username=azaion_admin;Password=..." } ``` ### JwtConfig ```json { "Issuer": "AzaionApi", "Audience": "Annotators/OrangePi/Admins", "Secret": "...", "TokenLifetimeHours": 4 } ``` ### ResourcesConfig ```json { "ResourcesFolder": "Content", "SuiteInstallerFolder": "suite", "SuiteStageInstallerFolder": "suite-stage" } ``` ## Resource Files The system stores and serves: - **AI models and DLLs** — stored in `ResourcesFolder`, served encrypted per-user - **Production installers** — files matching `AzaionSuite.Iterative*` in `SuiteInstallerFolder` - **Staging installers** — files matching `AzaionSuite.Iterative*` in `SuiteStageInstallerFolder`