feat: client read all, read, download, delete

fix: 🚑 creating table instead of record in database
This commit is contained in:
Ahmet Kaan GÜMÜŞ 2024-11-21 04:30:10 +03:00
parent 0c64f098c6
commit a968a2db4a
8 changed files with 145 additions and 22 deletions

View file

@ -14,6 +14,28 @@ pub struct Package {
location: String,
}
impl Package {
pub fn get_name(&self) -> String {
self.name.clone()
}
}
impl Default for Package {
fn default() -> Self {
Self {
name: Default::default(),
publisher: Default::default(),
version: Default::default(),
size: Default::default(),
hash: Default::default(),
dependencies: Default::default(),
publish_date_time: Default::default(),
last_update_date_time: Default::default(),
location: Default::default(),
}
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Version {
first: u8,
@ -21,7 +43,25 @@ pub struct Version {
third: u8,
}
impl Default for Version {
fn default() -> Self {
Self {
first: Default::default(),
second: Default::default(),
third: Default::default(),
}
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Publisher {
name: String,
}
impl Default for Publisher {
fn default() -> Self {
Self {
name: Default::default(),
}
}
}