feat(guild): channel membership + public visibility
- new channel_members table; creator always added, plus selected members - Channel.isPublic (default false): public channels visible to all guild members; non-public only to explicit members - GET /channels filters to channels visible to the requesting user Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
19
src/entities/channel-member.entity.ts
Normal file
19
src/entities/channel-member.entity.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user