Added belongs_to to most of diesel structs for easier querying.

This commit is contained in:
2026-01-06 22:00:52 +01:00
parent 5c928b30f3
commit ea9f05b048
8 changed files with 50 additions and 30 deletions

View File

@@ -8,6 +8,8 @@ use serde::{Deserialize, Serialize};
use uuid::Uuid;
#[derive(Serialize, Deserialize, Debug, Insertable, Queryable)]
#[diesel(belongs_to(user, foreign_key=FK_user_id))]
#[diesel(belongs_to(game, foreign_key=FK_gamenight_id))]
#[diesel(table_name = owned_game)]
pub struct OwnedGame {
pub user_id: Uuid,