Skip to content
Snippets Groups Projects
models.rs 353 B
Newer Older
Stephen D's avatar
Stephen D committed
use crate::schema::user_programs;
use bigdecimal::BigDecimal;

#[derive(Queryable)]
pub struct UserProgram {
	pub id: i32,
	pub discord_user_id: u64,
	pub name: String,
	pub code: String,
}

#[derive(Insertable)]
#[table_name = "user_programs"]
pub struct NewUserProgram<'a> {
	pub discord_user_id: BigDecimal,
	pub name: &'a str,
	pub code: &'a str,
}