forked from mirrors/pronouns.cc
feat: don't use shared models for prns
The shared models will eventually contain every field in the database, but prns.cc only needs the fields they currently have, so to cut down on memory usage it shouldn't use the shared models.
This commit is contained in:
parent
ca138efc8f
commit
ccd546759b
2 changed files with 17 additions and 1 deletions
|
@ -1,8 +1,10 @@
|
||||||
use pronouns::models::{member::Member, user::User};
|
pub mod models;
|
||||||
|
|
||||||
use rocket::{response::Redirect, Config, State};
|
use rocket::{response::Redirect, Config, State};
|
||||||
use simple_logger;
|
use simple_logger;
|
||||||
use sqlx::{postgres::PgPoolOptions, Pool, Postgres};
|
use sqlx::{postgres::PgPoolOptions, Pool, Postgres};
|
||||||
use std::{env, path::PathBuf};
|
use std::{env, path::PathBuf};
|
||||||
|
use crate::models::{User, Member};
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate rocket;
|
extern crate rocket;
|
||||||
|
|
||||||
|
|
14
prns/src/models.rs
Normal file
14
prns/src/models.rs
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct User {
|
||||||
|
pub id: String,
|
||||||
|
pub sid: String,
|
||||||
|
pub username: String,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
pub struct Member {
|
||||||
|
pub id: String,
|
||||||
|
pub user_id: String,
|
||||||
|
pub sid: String,
|
||||||
|
pub name: String,
|
||||||
|
}
|
Loading…
Reference in a new issue