Added chat_user type
This commit is contained in:
parent
1a5c95118e
commit
875b60a608
|
@ -12,3 +12,9 @@ pub struct ChatRoom {
|
|||
#[serde(rename = "lastUpdated")]
|
||||
pub last_updated: DateTime<Utc>,
|
||||
}
|
||||
|
||||
impl ChatRoom {
|
||||
pub fn new(title: String, owner_id: u32) -> Self {
|
||||
Self { id: 0, title, owner_id, time_created: Utc::now(), last_updated: Utc::now() }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
use serde::{Deserialize, Serialize};
|
||||
use chrono::{DateTime, Utc};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, PartialOrd, Ord, Default)]
|
||||
pub struct ChatUser {
|
||||
pub chat_room_id: u32,
|
||||
pub user_id: u32,
|
||||
pub time_joined: DateTime<Utc>,
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
pub mod chat_message;
|
||||
pub mod chat_message_update;
|
||||
pub mod chat_room;
|
||||
pub mod chat_room;
|
||||
pub mod chat_user;
|
|
@ -1 +1,2 @@
|
|||
pub mod domain;
|
||||
pub mod domain;
|
||||
pub mod dto;
|
Loading…
Reference in New Issue