626 B · text History 7a00c02
use sea_orm::entity::prelude::*;
use serde::{Deserialize, Serialize};

/// Approval vote: this person would go to this option.
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel, Serialize, Deserialize)]
#[sea_orm(table_name = "outing_votes")]
pub struct Model {
    #[sea_orm(primary_key, auto_increment = false)]
    pub outing_id: Uuid,
    #[sea_orm(primary_key, auto_increment = false)]
    pub user_id: Uuid,
    #[sea_orm(primary_key, auto_increment = false)]
    pub restaurant_id: Uuid,
}

#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}

impl ActiveModelBehavior for ActiveModel {}