23 lines
588 B
Rust
23 lines
588 B
Rust
use crate::{DateTimeUtc, MessageId, RoomId, UserId};
|
|
use sea_orm::entity::prelude::*;
|
|
|
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel)]
|
|
#[sea_orm(table_name = "room_attachment")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key)]
|
|
pub id: Uuid,
|
|
pub room: RoomId,
|
|
pub message: MessageId,
|
|
pub uploader: UserId,
|
|
pub file_name: String,
|
|
pub file_size: i64,
|
|
pub content_type: String,
|
|
pub s3_key: String,
|
|
pub created_at: DateTimeUtc,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|