// SPDX-License-Identifier: (0BSD or MIT) /* * advotracker - Hotline tackingtool for Advocats * * Copyright 2020-2021 Ralf Zerres */ use crate::schema::user_roles; use serde::Deserialize; /// Structure of a user role record #[derive(Debug, Queryable, PartialEq)] pub struct UserRole { /// id of the referenced user pub id_user: i32, /// id of the referenced role pub id_role: i32, } /// Structure of a new user role record #[derive(Deserialize, Insertable)] #[table_name = "user_roles"] pub struct NewUserRole { /// id of the referenced user pub id_user: i32, /// id of the referenced role pub id_role: i32, }