chatbridge/server/entities/channel.entity.ts

19 lines
433 B
TypeScript
Raw Normal View History

2023-07-25 01:40:22 +00:00
import { Entity, Column, Index, ManyToOne, OneToOne } from 'typeorm';
import Model from './model.entity';
import { Bridge } from "./bridge.entity";
import { Group } from "./group.entity";
@Entity('channels')
export class Channel extends Model {
@Column()
name: string;
@ManyToOne(() => Bridge, (bridge) => bridge.channels)
bridge: Bridge
@ManyToOne(() => Group, (group) => group.channels)
group: Group
}