Refacor electron app and add migrations
This commit is contained in:
50
electron/entities/RoomEntity.ts
Normal file
50
electron/entities/RoomEntity.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
import {
|
||||
Entity,
|
||||
PrimaryColumn,
|
||||
Column
|
||||
} from 'typeorm';
|
||||
|
||||
@Entity('rooms')
|
||||
export class RoomEntity {
|
||||
@PrimaryColumn('text')
|
||||
id!: string;
|
||||
|
||||
@Column('text')
|
||||
name!: string;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
description!: string | null;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
topic!: string | null;
|
||||
|
||||
@Column('text')
|
||||
hostId!: string;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
password!: string | null;
|
||||
|
||||
@Column('integer', { default: 0 })
|
||||
isPrivate!: number;
|
||||
|
||||
@Column('integer')
|
||||
createdAt!: number;
|
||||
|
||||
@Column('integer', { default: 0 })
|
||||
userCount!: number;
|
||||
|
||||
@Column('integer', { nullable: true })
|
||||
maxUsers!: number | null;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
icon!: string | null;
|
||||
|
||||
@Column('integer', { nullable: true })
|
||||
iconUpdatedAt!: number | null;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
permissions!: string | null;
|
||||
|
||||
@Column('text', { nullable: true })
|
||||
channels!: string | null;
|
||||
}
|
||||
Reference in New Issue
Block a user