From f711a0411cbe48319ea3497c4f26f872c18cd2a2 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 21 Aug 2021 16:47:22 +0200 Subject: :construction: typeorm --- util/src/models/Activity.ts | 80 +-------------------------------------------- 1 file changed, 1 insertion(+), 79 deletions(-) (limited to 'util/src/models/Activity.ts') diff --git a/util/src/models/Activity.ts b/util/src/models/Activity.ts index 17abd1ca..6b13477f 100644 --- a/util/src/models/Activity.ts +++ b/util/src/models/Activity.ts @@ -1,7 +1,5 @@ -import { User } from ".."; +import { User } from "./User"; import { ClientStatus, Status } from "./Status"; -import { Schema, model, Types, Document } from "mongoose"; -import toBigInt from "../util/toBigInt"; export interface Presence { user: User; @@ -47,82 +45,6 @@ export interface Activity { flags?: bigint; } -export const ActivitySchema = { - name: { type: String, required: true }, - type: { type: Number, required: true }, - url: String, - created_at: Date, - timestamps: [ - { - start: Number, - end: Number, - }, - ], - application_id: String, - details: String, - state: String, - emoji: { - name: String, - id: String, - amimated: Boolean, - }, - party: { - id: String, - size: [Number, Number], - }, - assets: { - large_image: String, - large_text: String, - small_image: String, - small_text: String, - }, - secrets: { - join: String, - spectate: String, - match: String, - }, - instance: Boolean, - flags: { type: String, get: toBigInt }, -}; - -export const ActivityBodySchema = { - name: String, - type: Number, - $url: String, - $created_at: Date, - $timestamps: [ - { - $start: Number, - $end: Number, - }, - ], - $application_id: String, - $details: String, - $state: String, - $emoji: { - $name: String, - $id: String, - $amimated: Boolean, - }, - $party: { - $id: String, - $size: [Number, Number], - }, - $assets: { - $large_image: String, - $large_text: String, - $small_image: String, - $small_text: String, - }, - $secrets: { - $join: String, - $spectate: String, - $match: String, - }, - $instance: Boolean, - $flags: BigInt, -}; - export enum ActivityType { GAME = 0, STREAMING = 1, -- cgit 1.5.1