Files
DP44/docs/ai/DataPRO/DbAPI/User.md
2026-04-17 14:55:32 -04:00

1.9 KiB

source_files, generated_at, model, schema_version, sha256
source_files generated_at model schema_version sha256
DataPRO/DbAPI/User/User.cs
2026-04-17T16:46:12.769149+00:00 zai-org/GLM-5-FP8 1 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

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

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.