import { Schema } from "mongoose"; import { EnumMap,IJson,IDocument,IObject,IInstance,IModel,IAction,IActionTypes } from "@onebro/oba-common"; import { CnDUserProfile,CnDUserProfilePreview } from "./profiles"; export enum CnDTourneyStatuses { N = "New", S = "Saved", Y = "Sent", Z = "Seen/Read", A = "Accepted", D = "Declined", R = "Revised", E = "Expired", C = "Cancelled",} export type CnDTourneyStatus = keyof typeof CnDTourneyStatuses; export type CnDTourneyConfig = { 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 CnDTourneyType = IObject & Omit & { author:CnDUserProfile; }; export interface CnDTourneyDocument extends IDocument,CnDTourneyType {} export interface CnDTourney extends IInstance,CnDTourneyDocument {} export interface CnDTourneyModel extends IModel {} export type CnDTourneyPublicKeys = Exclude; export type CnDTourneyPublicData = Pick; export type CnDTourneyJson = IJson & CnDTourneyPublicData & {published:Date;author:CnDUserProfilePreview;}; export type CnDTourneyModelMap = {CnDTourney:CnDTourneyModel;}; export type CnDTourneyInstanceMap = {tourney:CnDTourney;}; export type CnDTourneySchemaMap = {tourney:Schema;}; export type CnDTourneyActionTypes = IActionTypes; export type CnDTourneyActions = EnumMap;