22 lines
614 B
Rust
22 lines
614 B
Rust
use crate::{DateTimeUtc, UserId};
|
|
use sea_orm::entity::prelude::*;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, DeriveEntityModel)]
|
|
#[sea_orm(table_name = "ai_shared_conversation")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key)]
|
|
pub id: Uuid,
|
|
pub conversation_id: Uuid,
|
|
pub share_token: String,
|
|
pub created_by: UserId,
|
|
pub view_count: i32,
|
|
pub created_at: DateTimeUtc,
|
|
pub expires_at: Option<DateTimeUtc>,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|