From 469a3ad33914f7eff6edc9ca7fabb12f2950da84 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Thu, 14 Nov 2024 17:59:21 +0000 Subject: database work --- src/artist.rs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/artist.rs') 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, - name: String, - bio: Option, - site: Option, + id: Option, + pub handle: String, + pub name: Option, + pub bio: Option, + pub site: Option, +} + +impl Artist { + pub fn id(&self) -> Option { + self.id + } } -- cgit