import type { EntryStatus, Visibility } from "@prisma/client";

/**
 * Knowledge Entry entity
 * Represents a knowledge base document/page
 */
export interface KnowledgeEntryEntity {
  id: string;
  workspaceId: string;
  slug: string;
  title: string;
  content: string;
  contentHtml: string | null;
  summary: string | null;
  status: EntryStatus;
  visibility: Visibility;
  createdAt: Date;
  updatedAt: Date;
  createdBy: string;
  updatedBy: string;
}

/**
 * Extended knowledge entry with tag information
 */
export interface KnowledgeEntryWithTags extends KnowledgeEntryEntity {
  tags: {
    id: string;
    name: string;
    slug: string;
    color: string | null;
  }[];
}

/**
 * Paginated list response
 */
export interface PaginatedEntries {
  data: KnowledgeEntryWithTags[];
  pagination: {
    page: number;
    limit: number;
    total: number;
    totalPages: number;
  };
}
