chamesu
Version:
This package contains all packages of the chat application.
46 lines (36 loc) • 1.04 kB
text/typescript
/*
* Copyright (c) 2022.
* Author Peter Placzek (tada5hi)
* For the full copyright and license information,
* view the LICENSE file that was distributed with this source code.
*/
import {
Column,
CreateDateColumn,
Entity, JoinColumn, ManyToOne,
PrimaryGeneratedColumn,
UpdateDateColumn
} from "typeorm";
import {ChatRoom} from "../room";
import {AuthUser} from "../../auth/user";
()
export class ChatMember {
("uuid")
id: string;
()
created_at: string;
()
updated_at: string
({type: "boolean", nullable: true})
creator: boolean;
({type: "int", unsigned: true})
user_id: number;
({type: "varchar"})
room_id: string;
(() => ChatRoom, (chatRoom) => chatRoom.members, {onDelete: "CASCADE"})
({name: 'room_id'})
room: ChatRoom;
(() => AuthUser, { onDelete: 'CASCADE' })
({name: 'user_id'})
user: AuthUser;
}