Add ordering to categories, gallery images, and team members (#501)

This commit is contained in:
triphora
2022-12-23 14:34:04 -05:00
committed by GitHub
parent 9fed1cde25
commit 16d5a70c08
11 changed files with 1217 additions and 1041 deletions

View File

@@ -176,6 +176,7 @@ impl From<QueryProject> for Project {
title: x.title,
description: x.description,
created: x.created,
ordering: x.ordering,
})
.collect(),
flame_anvil_project: m.flame_anvil_project,
@@ -191,6 +192,7 @@ pub struct GalleryItem {
pub title: Option<String>,
pub description: Option<String>,
pub created: DateTime<Utc>,
pub ordering: i64,
}
#[derive(Serialize, Deserialize, Clone, Debug)]

View File

@@ -65,6 +65,8 @@ pub struct TeamMember {
/// Payouts split. This is a weighted average. For example. if a team has two members with this
/// value set to 25.0 for both members, they split revenue 50/50
pub payouts_split: Option<Decimal>,
/// Ordering of the member in the list
pub ordering: i64,
}
impl TeamMember {
@@ -91,6 +93,7 @@ impl TeamMember {
} else {
Some(data.payouts_split)
},
ordering: data.ordering,
}
}
}