import { Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn } from 'typeorm'; @Entity('channel_members') @Index(['channelId', 'userId'], { unique: true }) @Index(['userId']) export class ChannelMember { @PrimaryGeneratedColumn('uuid') id!: string; @Index() @Column({ type: 'char', length: 36 }) channelId!: string; @Column({ type: 'varchar', length: 64 }) userId!: string; @CreateDateColumn() createdAt!: Date; }