fish-lib 0.2.3

A work-in-progress fishing game library containing the game/storage logic for a discord fishing game I'm working on.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use chrono::{DateTime, Utc};
use diesel::prelude::*;

#[derive(Debug, Clone, PartialEq, Queryable)]
#[diesel(table_name = crate::schema::fish_user_locations)]
#[diesel(check_for_backend(diesel::pg::Pg))]
pub struct UserLocation {
    pub user_id: i64,
    pub location_id: i32,
    pub unlocked_at: DateTime<Utc>,
}

#[derive(Insertable)]
#[diesel(table_name = crate::schema::fish_user_locations)]
pub struct NewUserLocation {
    pub user_id: i64,
    pub location_id: i32,
}