mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57:25 +01:00
editor: First changes for work editor
This commit is contained in:
parent
15ba043050
commit
55b344605b
19 changed files with 1291 additions and 19 deletions
|
|
@ -4,10 +4,12 @@
|
|||
use chrono::NaiveDateTime;
|
||||
use diesel::prelude::*;
|
||||
use diesel::sqlite::Sqlite;
|
||||
use gtk::glib::{self, Boxed};
|
||||
|
||||
use super::{schema::*, TranslatedString};
|
||||
|
||||
#[derive(Insertable, Queryable, Selectable, Clone, Debug)]
|
||||
#[derive(Boxed, Insertable, Queryable, Selectable, Clone, Debug)]
|
||||
#[boxed_type(name = "MusicusPerson")]
|
||||
#[diesel(check_for_backend(Sqlite))]
|
||||
pub struct Person {
|
||||
pub person_id: String,
|
||||
|
|
@ -18,7 +20,8 @@ pub struct Person {
|
|||
pub last_played_at: Option<NaiveDateTime>,
|
||||
}
|
||||
|
||||
#[derive(Insertable, Queryable, Selectable, Clone, Debug)]
|
||||
#[derive(Boxed, Insertable, Queryable, Selectable, Clone, Debug)]
|
||||
#[boxed_type(name = "MusicusRole")]
|
||||
#[diesel(check_for_backend(Sqlite))]
|
||||
pub struct Role {
|
||||
pub role_id: String,
|
||||
|
|
@ -28,7 +31,8 @@ pub struct Role {
|
|||
pub last_used_at: NaiveDateTime,
|
||||
}
|
||||
|
||||
#[derive(Insertable, Queryable, Selectable, Clone, Debug)]
|
||||
#[derive(Boxed, Insertable, Queryable, Selectable, Clone, Debug)]
|
||||
#[boxed_type(name = "MusicusInstrument")]
|
||||
#[diesel(check_for_backend(Sqlite))]
|
||||
pub struct Instrument {
|
||||
pub instrument_id: String,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue