You've already forked AstralRinth
forked from didirus/AstralRinth
Mod Creation (#34)
* Inital creation stuff * File Reader * Upload bodies * Major rework: * Finish Multiple Files * Proper Error Handling * Switch to database models * Run formatter * Make dependencies dependent on Versions over mods * Fixes * Fix clippy * Run lint one last time * Update src/models/mods.rs Co-authored-by: AppleTheGolden <scotsbox@protonmail.com> Co-authored-by: AppleTheGolden <scotsbox@protonmail.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use crate::database::models::team_item::Team;
|
||||
use crate::database::models::Item;
|
||||
use crate::database::Result;
|
||||
use bson::{Bson, Document};
|
||||
@@ -5,15 +6,23 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub struct Mod {
|
||||
/// The ID for the mod, must be serializable to base62
|
||||
pub id: i32,
|
||||
//Todo: Move to own table
|
||||
/// The team that owns the mod
|
||||
pub team: Team,
|
||||
pub title: String,
|
||||
pub description: String,
|
||||
pub body_url: String,
|
||||
pub published: String,
|
||||
pub author: String,
|
||||
pub downloads: i32,
|
||||
pub categories: Vec<String>,
|
||||
pub body_path: String,
|
||||
pub icon_path: String,
|
||||
///A vector of Version IDs specifying the mod version of a dependency
|
||||
pub version_ids: Vec<i32>,
|
||||
pub icon_url: Option<String>,
|
||||
pub issues_url: Option<String>,
|
||||
pub source_url: Option<String>,
|
||||
pub wiki_url: Option<String>,
|
||||
}
|
||||
impl Item for Mod {
|
||||
fn get_collection() -> &'static str {
|
||||
|
||||
Reference in New Issue
Block a user