darkwing/database/user/model.rs
#![allow(
non_snake_case,
reason = "sqlx query_as macro does not support FromRow trait, so we cant use renamed fields. see https://github.com/launchbadge/sqlx/issues/1372 and https://github.com/launchbadge/sqlx/issues/514"
)]
//! User model module containing database entity representations for users.
//!
//! This module provides the database model for user entities, including their
//! relationships and data structures used for database operations.
use sqlx::FromRow;
/// Represents a user entity in the database.
///
/// This struct maps directly to the users table and contains all relevant
/// user information including their team association and role.
#[derive(FromRow, Debug, Default)]
#[allow(unused)]
pub struct User {
/// Unique identifier for the user
pub id: u64,
/// ID of the team this user belongs to
pub teamId: i64,
/// Username of the user
pub username: String,
/// Role of the user in the system
pub role: String,
}