From e8dcfef00fa9bd7ee91c377c602296e540582ef3 Mon Sep 17 00:00:00 2001 From: Migan178 Date: Wed, 29 Nov 2023 21:13:37 +0900 Subject: [PATCH] . --- package.json | 2 +- src/modules/database/database.ts | 10 +++++++++- src/modules/database/model/nsfwContent.ts | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 95e4dc3..ef395af 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "muffin-ai-arujak", - "version": "2.0.0-74-oreo", + "version": "2.0.0-75-oreo", "main": "dist/index.js", "private": true, "dependencies": { diff --git a/src/modules/database/database.ts b/src/modules/database/database.ts index fce72d8..80ba61f 100644 --- a/src/modules/database/database.ts +++ b/src/modules/database/database.ts @@ -1,5 +1,5 @@ import { createPool } from 'mysql2/promise' -import { StatementTable } from './model' +import { LearnTable, NSFWContentTable, StatementTable } from './model' import config from '../../../config.json' export class MaaDatabase { @@ -12,6 +12,14 @@ export class MaaDatabase { public get statement() { return new StatementTable(this._database) } + + public get nsfwContent() { + return new NSFWContentTable(this._database) + } + + public get learn() { + return new LearnTable(this._database) + } } const database = createPool({ diff --git a/src/modules/database/model/nsfwContent.ts b/src/modules/database/model/nsfwContent.ts index fc40cd6..948f15a 100644 --- a/src/modules/database/model/nsfwContent.ts +++ b/src/modules/database/model/nsfwContent.ts @@ -2,7 +2,7 @@ import { type Pool } from 'mysql2/promise' import run from '../run' import type { BaseTable, NSFWData } from '../type' -export class NsfwContentTable implements BaseTable { +export class NSFWContentTable implements BaseTable { public name = 'nsfw_content' public constructor(private _database: Pool) {}