20 lines
383 B
Rust
20 lines
383 B
Rust
use diesel::prelude::*;
|
|
use crate::schema::claims;
|
|
use crate::models::item::Loot;
|
|
|
|
#[derive(Identifiable, Queryable, Associations, Serialize, Debug)]
|
|
#[belongs_to(Loot)]
|
|
pub struct Claim {
|
|
id: i32,
|
|
player_id: i32,
|
|
loot_id: i32,
|
|
resolve: i32,
|
|
}
|
|
|
|
#[derive(Insertable, Debug)]
|
|
#[table_name="claims"]
|
|
pub struct NewClaim {
|
|
pub player_id: i32,
|
|
pub loot_id: i32,
|
|
}
|