34 lines
647 B
Rust
34 lines
647 B
Rust
use diesel::deserialize::Queryable;
|
|
|
|
// use crate::schema::*;
|
|
|
|
#[derive(Queryable)]
|
|
// #[table_name="media"]
|
|
pub struct Media {
|
|
pub id: u32,
|
|
pub display_name: String,
|
|
pub notes: String,
|
|
}
|
|
|
|
#[derive(Queryable)]
|
|
// #[table_name="media_type"]
|
|
pub struct MediaType {
|
|
pub id: u32,
|
|
pub type_name: String,
|
|
pub description: String,
|
|
}
|
|
|
|
#[derive(Queryable)]
|
|
// #[table_name="media_format"]
|
|
pub struct MediaFormat {
|
|
pub id: u32,
|
|
pub is_physical: bool,
|
|
pub format_name: String,
|
|
pub description: String,
|
|
}
|
|
|
|
#[derive(Queryable)]
|
|
pub struct MediaTypeFormatLink {
|
|
pub media_type_id: i32,
|
|
pub media_format_id: i32,
|
|
} |