import {TradechatGroup} from "./groups"; export type LocalUser = { email: string; password: string; username: string; valid: string; validToken: string; } export type FacebookUser = { id: string; token: string; email: string; name: string; } export type TwitterUser = { id: string; token: string; displayName: string; username: string; } export type GoogleUser = { id: string; token: string; email: string; name: string; } export type SessionInfo = { token:string; expDate: Date; } export type Product = { name: string; exp: Date; } export type userAdminLog = { created: Date; lastLogin: Date; ipCreated: Date; log: String } export class FmeSubscription { stripeId: string = ""; name:string = ""; startDate: Date = new Date(); lastBilling: Date = new Date(); nextBilling: Date = new Date(); expDate: Date = new Date(); nextAmount: number = 0; description: string = ""; } export type PasswordReset = { pwd: string; time: Date; } export type Penalty = { status: boolean; reason: string; date: Date; expiration: Date; log: string; banee:TradechatUser; } export type TwitterKeys = { consumerKey: string; consumerSecrect: string; accessTokenKey: string; accessTokenSecret: string; } export type Role = { name:string; } export class LoginLog { time:Date = new Date(); ipaddr:string=""; source:string=""; } export type StripeId = { company:string; stripeId:string; isLive:boolean; } export class FmeUser { _id?:string; admin: string[] = []; admin_log:string[] = []; affiliate: string[] = []; ban: Penalty = {} as Penalty; color: string = "#FFFFFF"; company: string = "MRTOPSTEP"; facebook: FacebookUser = {} as FacebookUser; groups: TradechatGroup[] = []; google: GoogleUser = {} as GoogleUser; invert_color: string = "#000000"; kick: Penalty = {} as Penalty; keys: any[] = []; login_count: number = 0; subscriptions: FmeSubscription[]= []; login_log: LoginLog[] = []; local: LocalUser = {} as LocalUser; password_reset: PasswordReset = {} as PasswordReset; payment_log: string[] = []; products: string[] = []; role:Role = {} as Role; rooms: string[] = []; sessionInfo: SessionInfo = {} as SessionInfo; stripeID: string = ""; stripeIds:StripeId[] = []; twitter: TwitterUser = {} as TwitterUser; isLive = true; // control for Stripe is this is a live customer expiredProducts:string[] = []; } export class LiteUser { _id?:string; color: string = "#FFFFFF"; company: string = "MRTOPSTEP"; invert_color: string = "#000000"; local: LocalUser = {} as LocalUser; twitter: TwitterUser = {} as TwitterUser; isLive = true; // control for Stripe is this is a live customer role: Role = {} as Role; } export type TradechatUser = { name:string; id?:string; role:string; color: string; invert_color: string; rooms: string[]; groups: TradechatGroup[]; company: string; socketIds:string[]; room:string; }