mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-10 12:42:44 +01:00
Merge pull request #435 from TheArcaneBrony/change-enums-to-number
Change enums to numbers
This commit is contained in:
commit
237137bd6e
@ -55,10 +55,7 @@ export class AuditLog extends BaseClass {
|
||||
@ManyToOne(() => User, (user: User) => user.id)
|
||||
user: User;
|
||||
|
||||
@Column({
|
||||
type: "simple-enum",
|
||||
enum: AuditLogEvents,
|
||||
})
|
||||
@Column({ type: "int" })
|
||||
action_type: AuditLogEvents;
|
||||
|
||||
@Column({ type: "simple-json", nullable: true })
|
||||
|
@ -39,7 +39,7 @@ export class Channel extends BaseClass {
|
||||
@Column({ type: "text", nullable: true })
|
||||
icon?: string | null;
|
||||
|
||||
@Column({ type: "simple-enum", enum: ChannelType })
|
||||
@Column({ type: "int" })
|
||||
type: ChannelType;
|
||||
|
||||
@OneToMany(() => Recipient, (recipient: Recipient) => recipient.channel, {
|
||||
|
@ -148,7 +148,7 @@ export class Message extends BaseClass {
|
||||
@Column({ nullable: true })
|
||||
pinned?: boolean;
|
||||
|
||||
@Column({ type: "simple-enum", enum: MessageType })
|
||||
@Column({ type: "int" })
|
||||
type: MessageType;
|
||||
|
||||
@Column({ type: "simple-json", nullable: true })
|
||||
|
@ -35,7 +35,7 @@ export class Relationship extends BaseClass {
|
||||
@Column({ nullable: true })
|
||||
nickname?: string;
|
||||
|
||||
@Column({ type: "simple-enum", enum: RelationshipType })
|
||||
@Column({ type: "int" })
|
||||
type: RelationshipType;
|
||||
|
||||
toPublicRelationship() {
|
||||
|
@ -36,9 +36,9 @@ export class Sticker extends BaseClass {
|
||||
})
|
||||
guild?: Guild;
|
||||
|
||||
@Column({ type: "simple-enum", enum: StickerType })
|
||||
@Column({ type: "int" })
|
||||
type: StickerType;
|
||||
|
||||
@Column({ type: "simple-enum", enum: StickerFormatType })
|
||||
@Column({ type: "int" })
|
||||
format_type: StickerFormatType;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ export enum TeamMemberState {
|
||||
|
||||
@Entity("team_members")
|
||||
export class TeamMember extends BaseClass {
|
||||
@Column({ type: "simple-enum", enum: TeamMemberState })
|
||||
@Column({ type: "int" })
|
||||
membership_state: TeamMemberState;
|
||||
|
||||
@Column({ type: "simple-array" })
|
||||
|
@ -12,7 +12,7 @@ export enum WebhookType {
|
||||
|
||||
@Entity("webhooks")
|
||||
export class Webhook extends BaseClass {
|
||||
@Column({ type: "simple-enum", enum: WebhookType })
|
||||
@Column({ type: "int" })
|
||||
type: WebhookType;
|
||||
|
||||
@Column({ nullable: true })
|
||||
|
Loading…
Reference in New Issue
Block a user