change: Rename UserId
to IdCol
and make it private
Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
parent
0274444434
commit
f0383296de
5 changed files with 8 additions and 8 deletions
|
@ -31,8 +31,8 @@ use crate::prelude::*;
|
||||||
#[sea_orm(table_name = "incoming_chat")]
|
#[sea_orm(table_name = "incoming_chat")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key)]
|
#[sea_orm(primary_key)]
|
||||||
pub id: UserId,
|
pub id: IdCol,
|
||||||
pub recipient_id: UserId,
|
pub recipient_id: IdCol,
|
||||||
/// Public key of the sender
|
/// Public key of the sender
|
||||||
pub sender: PublicKey,
|
pub sender: PublicKey,
|
||||||
/// The timestamp of the request, when it was received
|
/// The timestamp of the request, when it was received
|
||||||
|
|
|
@ -31,8 +31,8 @@ use crate::prelude::*;
|
||||||
#[sea_orm(table_name = "out_chat_requests")]
|
#[sea_orm(table_name = "out_chat_requests")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key)]
|
#[sea_orm(primary_key)]
|
||||||
pub id: UserId,
|
pub id: IdCol,
|
||||||
pub sender_id: UserId,
|
pub sender_id: IdCol,
|
||||||
/// Public key of the recipient
|
/// Public key of the recipient
|
||||||
pub recipient: PublicKey,
|
pub recipient: PublicKey,
|
||||||
/// The timestamp of the request, when it was sent
|
/// The timestamp of the request, when it was sent
|
||||||
|
|
|
@ -38,7 +38,7 @@ pub use sea_orm::{
|
||||||
};
|
};
|
||||||
|
|
||||||
/// User ID type
|
/// User ID type
|
||||||
pub type UserId = i64;
|
pub(crate) type IdCol = i64;
|
||||||
|
|
||||||
pub use super::incoming_chat::{
|
pub use super::incoming_chat::{
|
||||||
ActiveModel as IncomingChatActiveModel,
|
ActiveModel as IncomingChatActiveModel,
|
||||||
|
|
|
@ -31,7 +31,7 @@ use crate::prelude::*;
|
||||||
#[sea_orm(table_name = "users")]
|
#[sea_orm(table_name = "users")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key)]
|
#[sea_orm(primary_key)]
|
||||||
pub id: UserId,
|
pub id: IdCol,
|
||||||
pub public_key: PublicKey,
|
pub public_key: PublicKey,
|
||||||
pub last_logout: chrono::DateTime<Utc>,
|
pub last_logout: chrono::DateTime<Utc>,
|
||||||
pub is_admin: bool,
|
pub is_admin: bool,
|
||||||
|
|
|
@ -40,8 +40,8 @@ pub enum AccessStatus {
|
||||||
#[sea_orm(table_name = "users_status")]
|
#[sea_orm(table_name = "users_status")]
|
||||||
pub struct Model {
|
pub struct Model {
|
||||||
#[sea_orm(primary_key)]
|
#[sea_orm(primary_key)]
|
||||||
pub id: UserId,
|
pub id: IdCol,
|
||||||
pub user_id: UserId,
|
pub user_id: IdCol,
|
||||||
pub target: PublicKey,
|
pub target: PublicKey,
|
||||||
pub status: AccessStatus,
|
pub status: AccessStatus,
|
||||||
pub updated_at: chrono::DateTime<Utc>,
|
pub updated_at: chrono::DateTime<Utc>,
|
||||||
|
|
Loading…
Reference in a new issue