mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 19:57:25 +01:00
models: Add some TODOs
This commit is contained in:
parent
7d3ab7e56b
commit
bdf8ed989d
1 changed files with 3 additions and 0 deletions
|
|
@ -20,6 +20,7 @@ pub struct Work {
|
||||||
pub instruments: Vec<Instrument>,
|
pub instruments: Vec<Instrument>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Handle part composers.
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct WorkPart {
|
pub struct WorkPart {
|
||||||
pub work_id: String,
|
pub work_id: String,
|
||||||
|
|
@ -167,6 +168,7 @@ impl Work {
|
||||||
|
|
||||||
pub fn composers_string(&self) -> String {
|
pub fn composers_string(&self) -> String {
|
||||||
// TODO: Include roles except default composer.
|
// TODO: Include roles except default composer.
|
||||||
|
// TODO: Think about works without composers.
|
||||||
self.persons
|
self.persons
|
||||||
.iter()
|
.iter()
|
||||||
.map(|p| p.person.name.get().to_string())
|
.map(|p| p.person.name.get().to_string())
|
||||||
|
|
@ -184,6 +186,7 @@ impl PartialEq for Work {
|
||||||
|
|
||||||
impl Display for Work {
|
impl Display for Work {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
// TODO: Handle works without composers.
|
||||||
write!(f, "{}: {}", self.composers_string(), self.name)
|
write!(f, "{}: {}", self.composers_string(), self.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue