💾 Archived View for iich.space › src › db › models.ts captured on 2022-03-01 at 15:59:50.

View Raw

More Information

⬅️ Previous capture (2021-12-03)

-=-=-=-=-=-=-

export interface Identity {
  fingerprint: string;
  name: string;
}

export enum BoardType {
  Text,
  Image,
}

export enum PostType {
  Thread,
  Reply,
}

export interface Board {
  deleted: number;
  description: string;
  id: number;
  name: string;
  path: string;
  type: BoardType;
}

export interface Post {
  author: string;
  boardId: number;
  comment: string;
  createdAt: string;
  deleted: number;
  fingerprint: string | null;
  id: number;
  image: string | null;
  locked: number;
  muted: number;
  name: string | null;
  origin: string;
  path: string;
  threadId: number;
  type: PostType;
  updatedAt: string;
}

export interface RecentPost extends Post {
  threadComment: string;
}

export interface Thread extends Post {
  replyCount: number;
  lastReplyId: number;
}

export interface ThreadWithReplies extends Thread {
  replies: Array<Post>;
}

export interface PostStats {
  threadCount: number;
  replyCount: number;
}

export interface AdminPost extends Post {
  banned: number;
}

export interface Ban {
  origin: string;
}