diff options
author | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-01 16:04:00 -0600 |
---|---|---|
committer | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-01 16:04:00 -0600 |
commit | dbb9eea25f80e7984a112409863be5191af5bf5e (patch) | |
tree | cca24e23afc5e7bb4b92a0582aaec48f6a08af72 /server/entities/chat_room_connection.entity.ts | |
parent | 1108970a6aeb98a2f113383c6437dd4d862dae10 (diff) | |
download | locchat-dbb9eea25f80e7984a112409863be5191af5bf5e.tar.gz locchat-dbb9eea25f80e7984a112409863be5191af5bf5e.zip |
Added way too much stuff
Diffstat (limited to 'server/entities/chat_room_connection.entity.ts')
-rw-r--r-- | server/entities/chat_room_connection.entity.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/server/entities/chat_room_connection.entity.ts b/server/entities/chat_room_connection.entity.ts new file mode 100644 index 0000000..5691df1 --- /dev/null +++ b/server/entities/chat_room_connection.entity.ts @@ -0,0 +1,15 @@ +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm'; +import { User } from './user.entity'; +import { ChatRoom } from './chat_room.entity'; + +@Entity() +export class ChatRoomConnection { + @PrimaryGeneratedColumn() + id: string; + + @ManyToOne(() => User, (user) => user.chatRooms) + user: User; + + @ManyToOne(() => ChatRoom, (chatRoom) => chatRoom.chatRoomConnections) + chatRoom: ChatRoom; +} |