adds new 'shop' table

This commit is contained in:
2019-11-18 15:07:35 +01:00
parent cb8dfa9a2a
commit d1a85ed1d0
8 changed files with 173 additions and 54 deletions

View File

@@ -41,6 +41,11 @@ impl<'q> Claims<'q> {
claims::table.load(self.0)
}
pub fn by_player(&self, id: i32) -> QueryResult<Vec<Claim>> {
claims::table.filter(claims::dsl::player_id.eq(id))
.load(self.0)
}
/// Finds a single claim by association of player and loot ids.
pub fn find(&self, player_id: i32, loot_id: i32) -> QueryResult<Claim> {
claims::table