Organizations (#712)

* untested, unformatted, un-refactored

* minor simplification

* simplification fix

* refactoring, changes

* some fixes

* fixes, refactoring

* missed cache

* revs

* revs - more!

* removed donation links; added all org members to route

* renamed slug to title

---------

Co-authored-by: Geometrically <18202329+Geometrically@users.noreply.github.com>
This commit is contained in:
Wyatt Verchere
2023-10-02 10:56:57 -07:00
committed by GitHub
parent 58a61051b9
commit a1b59d4545
24 changed files with 3658 additions and 979 deletions

View File

@@ -1,4 +1,4 @@
use super::ids::Base62Id;
use super::ids::{Base62Id, OrganizationId};
use super::teams::TeamId;
use super::users::UserId;
use crate::database::models::project_item::QueryProject;
@@ -31,6 +31,8 @@ pub struct Project {
pub project_type: String,
/// The team of people that has ownership of this project.
pub team: TeamId,
/// The optional organization of people that have ownership of this project.
pub organization: Option<OrganizationId>,
/// The title or name of the project.
pub title: String,
/// A short description of the project.
@@ -120,6 +122,7 @@ impl From<QueryProject> for Project {
slug: m.slug,
project_type: data.project_type,
team: m.team_id.into(),
organization: m.organization_id.map(|i| i.into()),
title: m.title,
description: m.description,
body: m.body,