forked from Roflin/gamenight
Added belongs_to to most of diesel structs for easier querying.
This commit is contained in:
@@ -10,8 +10,8 @@ use super::DbConnection;
|
||||
use super::error::DatabaseError;
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Insertable, Queryable)]
|
||||
#[diesel(belongs_to(Gamenight))]
|
||||
#[diesel(belongs_to(User))]
|
||||
#[diesel(belongs_to(Gamenight, foreign_key=FK_gamenight_id))]
|
||||
#[diesel(belongs_to(User, foreign_key=FK_user_id))]
|
||||
#[diesel(table_name = gamenight_participant)]
|
||||
pub struct GamenightParticipant {
|
||||
pub gamenight_id: Uuid,
|
||||
|
||||
Reference in New Issue
Block a user