refactor(configuration): Setup configuration and menu to be reuseable
This commit is contained in:
parent
863ae3fab2
commit
d46bbd84c5
21 changed files with 551 additions and 452 deletions
6
source/Database/Models/ConfigurationModel.ts
Normal file
6
source/Database/Models/ConfigurationModel.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import {Model} from "./Model";
|
||||
|
||||
export type ConfigurationModel = Model & {
|
||||
key: string;
|
||||
value: string;
|
||||
}
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
import {Model} from "./Model";
|
||||
import {GroupModel} from "./GroupModel";
|
||||
import {ConfigurationModel} from "./ConfigurationModel";
|
||||
|
||||
export interface GroupConfigurationModel extends Model {
|
||||
export type GroupConfigurationModel = ConfigurationModel & {
|
||||
group: GroupModel;
|
||||
key: string;
|
||||
value: string;
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
import {Model} from "./Model";
|
||||
import {GuildMember, Role} from "../../types/DiscordTypes";
|
||||
|
||||
export interface GroupModel extends Model {
|
||||
export type GroupModel = Model & {
|
||||
name: string;
|
||||
leader: GuildMember;
|
||||
role: Role;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
export interface Model {
|
||||
export type Model = {
|
||||
id: number | bigint;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import {Model} from "./Model";
|
|||
import {GroupModel} from "./GroupModel";
|
||||
import {Nullable} from "../../types/Nullable";
|
||||
|
||||
export interface PlaydateModel extends Model {
|
||||
export type PlaydateModel = Model & {
|
||||
group: Nullable<GroupModel>
|
||||
from_time: Date,
|
||||
to_time: Date,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue