Skip to content
Snippets Groups Projects
models.rs 556 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,
}
Stephen D's avatar
Stephen D committed

#[derive(Clone, Queryable)]
Stephen D's avatar
Stephen D committed
pub struct ServerSetting {
	pub id: i32,
	pub guild_id: BigDecimal,
	pub starboard_threshold: i32,
	pub starboard_emoji_id: BigDecimal,
	pub starboard_channel: BigDecimal,
}