import { BaseEntity, Column, Entity, PrimaryGeneratedColumn } from "typeorm" @Entity({ name: 'guilds' }) export class Guild extends BaseEntity { @PrimaryGeneratedColumn("uuid") id: string @Column() name: string @Column() guild: string @Column() channel: string @Column() staffRole: string @Column() defaultExpiry?: string constructor(name: string, guild: string, channel: string, staffRole: string, jailedRole: string, defaultExpiry: string) { super() this.name = name this.guild = guild this.channel = channel this.staffRole = staffRole this.defaultExpiry = defaultExpiry } static async all(): Promise> { return await this.find() } }