change: Rename UserId to IdCol and make it private

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb 2024-07-28 10:40:04 +03:00
parent 0274444434
commit f0383296de
Signed by: awiteb
GPG key ID: 3F6B55640AA6682F
5 changed files with 8 additions and 8 deletions

View file

@ -31,8 +31,8 @@ use crate::prelude::*;
#[sea_orm(table_name = "incoming_chat")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: UserId,
pub recipient_id: UserId,
pub id: IdCol,
pub recipient_id: IdCol,
/// Public key of the sender
pub sender: PublicKey,
/// The timestamp of the request, when it was received

View file

@ -31,8 +31,8 @@ use crate::prelude::*;
#[sea_orm(table_name = "out_chat_requests")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: UserId,
pub sender_id: UserId,
pub id: IdCol,
pub sender_id: IdCol,
/// Public key of the recipient
pub recipient: PublicKey,
/// The timestamp of the request, when it was sent

View file

@ -38,7 +38,7 @@ pub use sea_orm::{
};
/// User ID type
pub type UserId = i64;
pub(crate) type IdCol = i64;
pub use super::incoming_chat::{
ActiveModel as IncomingChatActiveModel,

View file

@ -31,7 +31,7 @@ use crate::prelude::*;
#[sea_orm(table_name = "users")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: UserId,
pub id: IdCol,
pub public_key: PublicKey,
pub last_logout: chrono::DateTime<Utc>,
pub is_admin: bool,

View file

@ -40,8 +40,8 @@ pub enum AccessStatus {
#[sea_orm(table_name = "users_status")]
pub struct Model {
#[sea_orm(primary_key)]
pub id: UserId,
pub user_id: UserId,
pub id: IdCol,
pub user_id: IdCol,
pub target: PublicKey,
pub status: AccessStatus,
pub updated_at: chrono::DateTime<Utc>,