d5939db
use sea_orm::entity::prelude::*;
use time::OffsetDateTime;
use uuid::Uuid;
#[sea_orm::model]
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "post_relation_label")]
pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: Uuid,
pub post_id: Uuid,
pub label_id: Uuid,
pub created_at: OffsetDateTime,
#[sea_orm(belongs_to, from = "post_id", to = "id")]
pub post: BelongsTo<super::post::Entity>,
#[sea_orm(belongs_to, from = "label_id", to = "id")]
pub label: BelongsTo<super::post_labels::Entity>,
}
impl ActiveModelBehavior for ActiveModel {}