1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-11 05:02:37 +01:00

Put local types back

This commit is contained in:
The Arcane Brony 2021-10-10 21:30:46 +02:00
parent a11d693f43
commit 7d36d3d62c
8 changed files with 17 additions and 17 deletions

View File

@ -55,8 +55,8 @@ export class AuditLog extends BaseClass {
@ManyToOne(() => User, (user: User) => user.id) @ManyToOne(() => User, (user: User) => user.id)
user: User; user: User;
@Column() @Column({ type: "int" })
action_type: number; action_type: AuditLogEvents;
@Column({ type: "simple-json", nullable: true }) @Column({ type: "simple-json", nullable: true })
options?: { options?: {

View File

@ -39,8 +39,8 @@ export class Channel extends BaseClass {
@Column({ type: "text", nullable: true }) @Column({ type: "text", nullable: true })
icon?: string | null; icon?: string | null;
@Column() @Column({ type: "int" })
type: number; type: ChannelType;
@OneToMany(() => Recipient, (recipient: Recipient) => recipient.channel, { @OneToMany(() => Recipient, (recipient: Recipient) => recipient.channel, {
cascade: true, cascade: true,

View File

@ -148,8 +148,8 @@ export class Message extends BaseClass {
@Column({ nullable: true }) @Column({ nullable: true })
pinned?: boolean; pinned?: boolean;
@Column() @Column({ type: "int" })
type: number; type: MessageType;
@Column({ type: "simple-json", nullable: true }) @Column({ type: "simple-json", nullable: true })
activity?: { activity?: {

View File

@ -35,8 +35,8 @@ export class Relationship extends BaseClass {
@Column({ nullable: true }) @Column({ nullable: true })
nickname?: string; nickname?: string;
@Column() @Column({ type: "int" })
type: number; type: RelationshipType;
toPublicRelationship() { toPublicRelationship() {
return { return {

View File

@ -36,7 +36,7 @@ export class Role extends BaseClass {
@Column() @Column()
position: number; position: number;
@Column({ type: "simple-json", nullable: true, }) @Column({ type: "simple-json", nullable: true })
tags?: { tags?: {
bot_id?: string; bot_id?: string;
integration_id?: string; integration_id?: string;

View File

@ -36,9 +36,9 @@ export class Sticker extends BaseClass {
}) })
guild?: Guild; guild?: Guild;
@Column() @Column({ type: "int" })
type: number; type: StickerType;
@Column() @Column({ type: "int" })
format_type: number; format_type: StickerFormatType;
} }

View File

@ -9,8 +9,8 @@ export enum TeamMemberState {
@Entity("team_members") @Entity("team_members")
export class TeamMember extends BaseClass { export class TeamMember extends BaseClass {
@Column() @Column({ type: "int" })
membership_state: number; membership_state: TeamMemberState;
@Column({ type: "simple-array" }) @Column({ type: "simple-array" })
permissions: string[]; permissions: string[];

View File

@ -12,8 +12,8 @@ export enum WebhookType {
@Entity("webhooks") @Entity("webhooks")
export class Webhook extends BaseClass { export class Webhook extends BaseClass {
@Column() @Column({ type: "int" })
type: number; type: WebhookType;
@Column({ nullable: true }) @Column({ nullable: true })
name?: string; name?: string;