init
This commit is contained in:
52
docs/ai/DataPRO/DbAPI/User.md
Normal file
52
docs/ai/DataPRO/DbAPI/User.md
Normal file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
source_files:
|
||||
- DataPRO/DbAPI/User/User.cs
|
||||
generated_at: "2026-04-17T16:46:12.769149+00:00"
|
||||
model: "zai-org/GLM-5-FP8"
|
||||
schema_version: 1
|
||||
sha256: "0503b861b2f057b5"
|
||||
---
|
||||
|
||||
# Documentation: `DbAPI.User.User`
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
This module provides a basic implementation of `IUserDbRecord` representing a user entity within the DbAPI data access layer. It serves as a data transfer object for user records and contains a factory method (`GetUser`) to retrieve user records from the database via stored procedures. The class bridges the database schema with the application's user management system, handling user authentication lookups and role information.
|
||||
|
||||
---
|
||||
|
||||
## 2. Public Interface
|
||||
|
||||
### Class: `User` (internal)
|
||||
**Implements:** `IUserDbRecord`
|
||||
|
||||
#### Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `ID` | `int` | Unique identifier for the user. |
|
||||
| `UserName` | `string` | Login username. |
|
||||
| `DisplayName` | `string` | Human-readable display name. |
|
||||
| `Password` | `string` | User password (storage format unclear from source). |
|
||||
| `Role` | `short` | Numeric role identifier. |
|
||||
| `LastModified` | `DateTime` | Timestamp of last modification. |
|
||||
| `LastModifiedBy` | `string` | Identifier of who last modified the record. |
|
||||
| `LocalOnly` | `bool` | Flag indicating whether user is local-only. |
|
||||
|
||||
#### Constructor
|
||||
|
||||
```csharp
|
||||
public User(int id, string user, string display, string pwd, short role, DateTime lastModified, string lastModifiedBy, bool local)
|
||||
```
|
||||
Initializes all properties with provided values.
|
||||
|
||||
#### Methods
|
||||
|
||||
```csharp
|
||||
internal static ulong GetUser(IConnectionDetails connection, out IUserDbRecord usr, string userName)
|
||||
```
|
||||
Retrieves a user record from the database by username. Returns an error code (`ulong`) and populates the `out` parameter `usr` with the retrieved `IUserDbRecord` on success.
|
||||
|
||||
**Return codes:**
|
||||
- `Errors.ErrorCodes.ERROR_SUCCESS` - User found and retrieved successfully.
|
||||
-
|
||||
Reference in New Issue
Block a user