refactor: Refactor in_chat_requests table #35

Manually merged
awiteb merged 7 commits from awiteb/rename-chat-request-table-and-save-respnse-in-it into master 2024-07-30 10:39:04 +02:00 AGit
5 changed files with 8 additions and 8 deletions
Showing only changes of commit f0383296de - Show all commits

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>,