chatbridge/server/entities/group.entity.ts

20 lines
405 B
TypeScript
Raw Normal View History

2023-07-25 01:40:22 +00:00
import { Entity, Column, Index, OneToMany } from 'typeorm';
import Model from './model.entity';
import { Channel } from "./channel.entity";
@Entity('groups')
export class Group extends Model {
@Column({
unique: true
})
name: string;
@Column({
default: true
})
enable: boolean;
@OneToMany(() => Channel, (channel) => channel.bridge)
channels: Channel[]
}