Created
February 7, 2017 07:49
-
-
Save timkaechele/16a0c2807f7bb0cd00bee4d6369b88f5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef char* string; | |
#define class struct; | |
// Definition of Datastructures | |
// stars (*) indicate a reference to another data structure | |
// Think of it as a `belongs_to` relation. | |
// | |
// Every object has an id as well as a updated and created timestamp | |
// Syntax reference: | |
// class ClassName { | |
// type attribute_name; | |
// } | |
// In Lack of a Better word | |
class Team { | |
} | |
class Teams_Users { | |
Team* team; | |
User* user; | |
} | |
class User { | |
string first_name; // optional | |
string last_name; // optional | |
string email; // required | |
string password_digest; // required | |
} | |
class Board { | |
Team *team; | |
string title; | |
} | |
class Boards_Users { | |
Board* board; | |
User* user; | |
} | |
class Lane { | |
Board* board; | |
string title; | |
bool open_for_card_creation; // true if a user is allowed to create cards in this lane | |
} | |
// Will be created every time a user triggers an action | |
// e.g. | |
// - remove card | |
// - drag card to another lane | |
class Activity { | |
User* creator; | |
string translation_key; | |
json data; | |
} | |
class Boards_Participants { | |
User* user; // required | |
Board* board; // required | |
} | |
class Comment { | |
Card* card; // required | |
string content; // required | |
User* creator; // required | |
} | |
class Calendar { | |
string name; | |
Board* board; | |
} | |
class Event { | |
Calendar* calendar; | |
time start; | |
time end; | |
string name; | |
EventRepetition repeatInterval; | |
} | |
enum EventRepetition { | |
single, | |
daily, | |
weekly | |
} | |
// User Actions | |
/** | |
* Moves a card from one lane to another one. | |
*/ | |
void MoveCard(lane source, lane target, card c) { | |
RemoveCard(source, card); | |
AddCard(target, card); | |
NotifyUser(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment