mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-10 20:52:42 +01:00
Change enums to numbers
This commit is contained in:
parent
d38953439c
commit
d7fa45771d
@ -55,11 +55,8 @@ export class AuditLog extends BaseClass {
|
||||
@ManyToOne(() => User, (user: User) => user.id)
|
||||
user: User;
|
||||
|
||||
@Column({
|
||||
type: "simple-enum",
|
||||
enum: AuditLogEvents,
|
||||
})
|
||||
action_type: AuditLogEvents;
|
||||
@Column()
|
||||
action_type: number;
|
||||
|
||||
@Column({ type: "simple-json", nullable: true })
|
||||
options?: {
|
||||
|
@ -39,8 +39,8 @@ export class Channel extends BaseClass {
|
||||
@Column({ type: "text", nullable: true })
|
||||
icon?: string | null;
|
||||
|
||||
@Column({ type: "simple-enum", enum: ChannelType })
|
||||
type: ChannelType;
|
||||
@Column()
|
||||
type: number;
|
||||
|
||||
@OneToMany(() => Recipient, (recipient: Recipient) => recipient.channel, {
|
||||
cascade: true,
|
||||
|
@ -148,8 +148,8 @@ export class Message extends BaseClass {
|
||||
@Column({ nullable: true })
|
||||
pinned?: boolean;
|
||||
|
||||
@Column({ type: "simple-enum", enum: MessageType })
|
||||
type: MessageType;
|
||||
@Column()
|
||||
type: number;
|
||||
|
||||
@Column({ type: "simple-json", nullable: true })
|
||||
activity?: {
|
||||
|
@ -35,8 +35,8 @@ export class Relationship extends BaseClass {
|
||||
@Column({ nullable: true })
|
||||
nickname?: string;
|
||||
|
||||
@Column({ type: "simple-enum", enum: RelationshipType })
|
||||
type: RelationshipType;
|
||||
@Column()
|
||||
type: number;
|
||||
|
||||
toPublicRelationship() {
|
||||
return {
|
||||
|
@ -36,7 +36,7 @@ export class Role extends BaseClass {
|
||||
@Column()
|
||||
position: number;
|
||||
|
||||
@Column({ type: "simple-json", nullable: true })
|
||||
@Column({ type: "simple-json", nullable: true, })
|
||||
tags?: {
|
||||
bot_id?: string;
|
||||
integration_id?: string;
|
||||
|
@ -36,9 +36,9 @@ export class Sticker extends BaseClass {
|
||||
})
|
||||
guild?: Guild;
|
||||
|
||||
@Column({ type: "simple-enum", enum: StickerType })
|
||||
type: StickerType;
|
||||
@Column()
|
||||
type: number;
|
||||
|
||||
@Column({ type: "simple-enum", enum: StickerFormatType })
|
||||
format_type: StickerFormatType;
|
||||
@Column()
|
||||
format_type: number;
|
||||
}
|
||||
|
@ -9,8 +9,8 @@ export enum TeamMemberState {
|
||||
|
||||
@Entity("team_members")
|
||||
export class TeamMember extends BaseClass {
|
||||
@Column({ type: "simple-enum", enum: TeamMemberState })
|
||||
membership_state: TeamMemberState;
|
||||
@Column()
|
||||
membership_state: number;
|
||||
|
||||
@Column({ type: "simple-array" })
|
||||
permissions: string[];
|
||||
|
@ -12,8 +12,8 @@ export enum WebhookType {
|
||||
|
||||
@Entity("webhooks")
|
||||
export class Webhook extends BaseClass {
|
||||
@Column({ type: "simple-enum", enum: WebhookType })
|
||||
type: WebhookType;
|
||||
@Column()
|
||||
type: number;
|
||||
|
||||
@Column({ nullable: true })
|
||||
name?: string;
|
||||
|
Loading…
Reference in New Issue
Block a user