26 lines
715 B
Rust
26 lines
715 B
Rust
use crate::{DateTimeUtc, UserId};
|
|
use sea_orm::entity::prelude::*;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Serialize, Deserialize)]
|
|
#[sea_orm(table_name = "notify")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key)]
|
|
pub id: i64,
|
|
#[sea_orm(column_name = "user_uuid")]
|
|
pub user: UserId,
|
|
pub title: String,
|
|
pub description: Option<String>,
|
|
pub content: String,
|
|
pub url: Option<String>,
|
|
pub kind: i32,
|
|
pub read_at: Option<DateTimeUtc>,
|
|
pub deleted_at: Option<DateTimeUtc>,
|
|
pub created_at: DateTimeUtc,
|
|
}
|
|
|
|
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
|
|
pub enum Relation {}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|