17 lines
496 B
Rust
17 lines
496 B
Rust
use crate::{ProjectId, UserId};
|
|
use sea_orm::entity::prelude::*;
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
#[sea_orm::model]
|
|
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)]
|
|
#[sea_orm(table_name = "project_like")]
|
|
pub struct Model {
|
|
#[sea_orm(primary_key, auto_increment = false)]
|
|
pub project: ProjectId,
|
|
#[sea_orm(primary_key, auto_increment = false)]
|
|
pub user: UserId,
|
|
pub created_at: DateTimeUtc,
|
|
}
|
|
|
|
impl ActiveModelBehavior for ActiveModel {}
|