export interface DiscussionBoard {
  id: number;
  name: string;
  course_id: number;
  course_name: string;
  batch_id?: number;
  batch_name?: string;
  chapter_id?: number;
  chapter_name?: string;
  assignment_id?: number;
  is_enabled: boolean;
  allow_student_posts: boolean;
  post_count: number;
}

export interface DiscussionPost {
  id: number;
  board_id: number;
  parent_id?: number;
  author_id: number;
  author_name: string;
  author_role: string;
  title?: string;
  content: string;
  attachment_ids: number[];
  attachment_names: string[];
  is_pinned: boolean;
  is_resolved: boolean;
  reply_count: number;
  created_at: string;
  replies?: DiscussionPost[];
}

export interface Announcement {
  id: number;
  title: string;
  content: string;
  author_id: number;
  author_name: string;
  course_id?: number;
  course_name?: string;
  batch_id?: number;
  batch_name?: string;
  priority: "normal" | "important" | "urgent";
  is_published: boolean;
  published_at?: string;
  expires_at?: string;
  send_email: boolean;
  attachment_ids: number[];
  attachment_names: string[];
}

export interface Message {
  id: number;
  sender_id: number;
  sender_name: string;
  recipient_id: number;
  recipient_name: string;
  subject: string;
  content: string;
  is_read: boolean;
  read_at?: string;
  attachment_ids: number[];
  attachment_names: string[];
  send_email_copy: boolean;
  created_at: string;
}

export interface PostCreateRequest {
  board_id: number;
  parent_id?: number;
  title?: string;
  content: string;
}

export interface AnnouncementCreateRequest {
  title: string;
  content: string;
  course_id?: number;
  batch_id?: number;
  priority?: "normal" | "important" | "urgent";
  send_email?: boolean;
  expires_at?: string;
}

export interface MessageCreateRequest {
  recipient_id: number;
  subject: string;
  content: string;
  send_email_copy?: boolean;
}
