summaryrefslogtreecommitdiffstats
path: root/src/artist.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/artist.rs')
-rw-r--r--src/artist.rs19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/artist.rs b/src/artist.rs
index 06b90e7..476dad9 100644
--- a/src/artist.rs
+++ b/src/artist.rs
@@ -1,6 +1,17 @@
+use crate::error::Error;
+use crate::Result;
+
+#[derive(sqlx::FromRow)]
pub struct Artist {
- id: Option<usize>,
- name: String,
- bio: Option<String>,
- site: Option<String>,
+ id: Option<i32>,
+ pub handle: String,
+ pub name: Option<String>,
+ pub bio: Option<String>,
+ pub site: Option<String>,
+}
+
+impl Artist {
+ pub fn id(&self) -> Option<i32> {
+ self.id
+ }
}