mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-14 06:32:36 +01:00
27 lines
655 B
TypeScript
27 lines
655 B
TypeScript
import { PublicMember } from "./Member";
|
|
import { Schema, model, Types, Document } from "mongoose";
|
|
import db from "../util/Database";
|
|
|
|
export interface ReadState extends Document {
|
|
message_id: string;
|
|
channel_id: string;
|
|
user_id: string;
|
|
last_message_id?: string;
|
|
last_pin_timestamp?: Date;
|
|
mention_count: number;
|
|
manual: boolean;
|
|
}
|
|
|
|
export const ReadStateSchema = new Schema({
|
|
message_id: String,
|
|
channel_id: String,
|
|
user_id: String,
|
|
last_message_id: String,
|
|
last_pin_timestamp: Date,
|
|
mention_count: Number,
|
|
manual: Boolean,
|
|
});
|
|
|
|
// @ts-ignore
|
|
export const ReadStateModel = db.model<ReadState>("ReadState", ReadStateSchema, "readstates");
|