This repository was archived by the owner on Apr 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Class Outline
Junior edited this page Mar 2, 2020
·
2 revisions
interface SpaceOptions {
bool Private;
bool Limited;
DiscordUser[] Contributors;
}
interface SpaceModel : SpaceOptions {
DiscordUser Author;
Tag[] Tags;
Date LastModified; // ?
Date Created; // ?
}
interface TagOptions {
}
interface TagModel : TagOptions {
}
class Space {
public Space(string name);
public static Space Create(string, DiscordUser author, SpaceOptions options = {});
public static bool Delete(string name);
public Tag Random { get; }
public void AddContributor(DiscordUser user);
public void IsContributor(DiscordUser user);
public void RemoveContributor(DiscordUser user);
public vodi ClearContributors();
public void AddContributors(DiscordUser[] users); // ?
public void RemoveContributors(DiscordUser[] users); // ?
// Query Methods
public Tag GetTag(string tagName);
public void TryGetTag(string tagName, out result);
public bool HasTag(string tagName);
// Input Methods
public bool DeleteTag(string tagName);
public bool Rename(string newName);
}
class Tag {
public Tag() {}
}enum EUserFlag {
ADMIN,
BANNED
}
interface IUser {
id: Snowflake;
username: string;
discriminator: number;
is: Set<EUserFlag>
favorites: {
tag: ITag[];
space: ISpace[]; //?
};
spaces: ISpace[];
}interface ISpace {
author: IUser; // rename to owner?
contributors: IUser[] = [@author];
tags: ITag[] = [];
lastModified: Date as string
private: boolean = false;
limited: boolean = false;
}interface ITag {
author: IUser // rename to owner?
content: string // possible to convert to string[] for pagniation?
lastModified: Date as string
uses: number = 0;
favorites: IUser[] = []; // ??
}