import { Schema } from "mongoose"; import { EnumMap,IJson,IDocument,IObject,IInstance,IModel,IAction,IActionTypes } from "@onebro/oba-common"; import { DominoDownUserProfile,DominoDownUserProfilePreview } from "./profiles"; export enum DominoDownGameStatuses { N = "New", S = "Saved", Y = "Sent", Z = "Seen/Read", A = "Accepted", D = "Declined", R = "Revised", E = "Expired", C = "Cancelled",} export type DominoDownGameStatus = keyof typeof DominoDownGameStatuses; export type DominoDownGameConfig = { type:"contactus"|"note"|"chat"|"buy-alert"|"sell-alert"; author:string; body:string; symbol:string; subscribers:string[]; sendAt:{time?:Date;price?:number;}; img?:string; link?:string;}; export type DominoDownGameType = IObject & Omit & { author:DominoDownUserProfile; }; export interface DominoDownGameDocument extends IDocument,DominoDownGameType {} export interface DominoDownGame extends IInstance,DominoDownGameDocument {} export interface DominoDownGameModel extends IModel {} export type DominoDownGamePublicKeys = Exclude; export type DominoDownGamePublicData = Pick; export type DominoDownGameJson = IJson & DominoDownGamePublicData & {published:Date;author:DominoDownUserProfilePreview;}; export type DominoDownGameModelMap = {DominoDownGame:DominoDownGameModel;}; export type DominoDownGameInstanceMap = {game:DominoDownGame;}; export type DominoDownGameSchemaMap = {game:Schema;}; export type DominoDownGameActionTypes = IActionTypes; export type DominoDownGameActions = EnumMap;