This commit is contained in:
Siwoo Jeon 2023-11-29 21:13:37 +09:00
parent 20df7b3fda
commit e8dcfef00f
Signed by: migan
GPG key ID: C4151385FFD2082A
3 changed files with 11 additions and 3 deletions

View file

@ -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": {

View file

@ -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({

View file

@ -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<NSFWData, number> {
export class NSFWContentTable implements BaseTable<NSFWData, number> {
public name = 'nsfw_content'
public constructor(private _database: Pool) {}