1
0
Atdalīts 0
media-collection-crud/src/models.rs

32 rindas
573 B
Rust

use diesel::Queryable;
use crate::schema::*;
#[derive(Debug, Queryable)]
pub struct Media {
pub id: u32,
pub display_name: String,
pub notes: String,
}
#[derive(Debug, Queryable)]
pub struct MediaType {
pub id: u32,
pub type_name: String,
pub description: String,
}
#[derive(Debug, Queryable)]
pub struct MediaFormat {
pub id: u32,
pub is_physical: bool,
pub format_name: String,
pub description: String,
}
#[derive(Debug, Queryable)]
pub struct MediaTypeFormatLink {
pub media_type_id: i32,
pub media_format_id: i32,
}