.
This commit is contained in:
parent
20df7b3fda
commit
e8dcfef00f
3 changed files with 11 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "muffin-ai-arujak",
|
"name": "muffin-ai-arujak",
|
||||||
"version": "2.0.0-74-oreo",
|
"version": "2.0.0-75-oreo",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { createPool } from 'mysql2/promise'
|
import { createPool } from 'mysql2/promise'
|
||||||
import { StatementTable } from './model'
|
import { LearnTable, NSFWContentTable, StatementTable } from './model'
|
||||||
import config from '../../../config.json'
|
import config from '../../../config.json'
|
||||||
|
|
||||||
export class MaaDatabase {
|
export class MaaDatabase {
|
||||||
|
@ -12,6 +12,14 @@ export class MaaDatabase {
|
||||||
public get statement() {
|
public get statement() {
|
||||||
return new StatementTable(this._database)
|
return new StatementTable(this._database)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get nsfwContent() {
|
||||||
|
return new NSFWContentTable(this._database)
|
||||||
|
}
|
||||||
|
|
||||||
|
public get learn() {
|
||||||
|
return new LearnTable(this._database)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const database = createPool({
|
const database = createPool({
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { type Pool } from 'mysql2/promise'
|
||||||
import run from '../run'
|
import run from '../run'
|
||||||
import type { BaseTable, NSFWData } from '../type'
|
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 name = 'nsfw_content'
|
||||||
public constructor(private _database: Pool) {}
|
public constructor(private _database: Pool) {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue