Moved from mongodb to sql and sqlite
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
import { Schema, model } from "mongoose"
|
||||
|
||||
const guildAppSchema = new Schema({
|
||||
_id: Schema.Types.ObjectId,
|
||||
userID: { type: String, required: true },
|
||||
uuid: { type: String, required: true }
|
||||
})
|
||||
|
||||
export = model("guildapp", guildAppSchema, "guildapp")
|
||||
20
src/schemas/guildAppTag.ts
Normal file
20
src/schemas/guildAppTag.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import Sequelize, { InferAttributes, InferCreationAttributes, Model } from "sequelize"
|
||||
import { sequelize } from "utils/Illegitimate"
|
||||
|
||||
interface GuildApp extends Model<InferAttributes<GuildApp>, InferCreationAttributes<GuildApp>> {
|
||||
userID: string
|
||||
uuid: string
|
||||
}
|
||||
|
||||
const tag = sequelize.define<GuildApp>("guildApp", {
|
||||
userID: {
|
||||
type: Sequelize.STRING,
|
||||
allowNull: false
|
||||
},
|
||||
uuid: {
|
||||
type: Sequelize.STRING,
|
||||
allowNull: false
|
||||
}
|
||||
})
|
||||
|
||||
export default tag
|
||||
@@ -1,9 +0,0 @@
|
||||
import { Schema, model } from "mongoose"
|
||||
|
||||
const settingsSchema = new Schema({
|
||||
_id: Schema.Types.ObjectId,
|
||||
name: { type: String, required: true },
|
||||
value: { type: String, required: true }
|
||||
})
|
||||
|
||||
export = model("settings", settingsSchema, "settings")
|
||||
20
src/schemas/settingsTag.ts
Normal file
20
src/schemas/settingsTag.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import Sequelize, { InferAttributes, InferCreationAttributes, Model } from "sequelize"
|
||||
import { sequelize } from "utils/Illegitimate"
|
||||
|
||||
interface Settings extends Model<InferAttributes<Settings>, InferCreationAttributes<Settings>> {
|
||||
name: string
|
||||
value: string
|
||||
}
|
||||
|
||||
const tag = sequelize.define<Settings>("settings", {
|
||||
name: {
|
||||
type: Sequelize.STRING,
|
||||
allowNull: false
|
||||
},
|
||||
value: {
|
||||
type: Sequelize.STRING,
|
||||
allowNull: false
|
||||
}
|
||||
})
|
||||
|
||||
export default tag
|
||||
@@ -1,9 +0,0 @@
|
||||
import { Schema, model } from "mongoose"
|
||||
|
||||
const staffAppSchema = new Schema({
|
||||
_id: Schema.Types.ObjectId,
|
||||
userID: { type: String, required: true },
|
||||
uuid: { type: String, required: true }
|
||||
})
|
||||
|
||||
export = model("staffapp", staffAppSchema, "staffapp")
|
||||
20
src/schemas/staffAppTag.ts
Normal file
20
src/schemas/staffAppTag.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import Sequelize, { InferAttributes, InferCreationAttributes, Model } from "sequelize"
|
||||
import { sequelize } from "utils/Illegitimate"
|
||||
|
||||
interface StaffApp extends Model<InferAttributes<StaffApp>, InferCreationAttributes<StaffApp>> {
|
||||
userID: string
|
||||
uuid: string
|
||||
}
|
||||
|
||||
const tag = sequelize.define<StaffApp>("staffApp", {
|
||||
userID: {
|
||||
type: Sequelize.STRING,
|
||||
allowNull: false
|
||||
},
|
||||
uuid: {
|
||||
type: Sequelize.STRING,
|
||||
allowNull: false
|
||||
}
|
||||
})
|
||||
|
||||
export default tag
|
||||
@@ -1,9 +0,0 @@
|
||||
import { Schema, model } from "mongoose"
|
||||
|
||||
const verifySchema = new Schema({
|
||||
_id: Schema.Types.ObjectId,
|
||||
userID: { type: String, required: true },
|
||||
uuid: { type: String, required: true }
|
||||
})
|
||||
|
||||
export = model("verify", verifySchema, "verify")
|
||||
20
src/schemas/verifyTag.ts
Normal file
20
src/schemas/verifyTag.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import Sequelize, { InferAttributes, InferCreationAttributes, Model } from "sequelize"
|
||||
import { sequelize } from "utils/Illegitimate"
|
||||
|
||||
interface Verify extends Model<InferAttributes<Verify>, InferCreationAttributes<Verify>> {
|
||||
userID: string
|
||||
uuid: string
|
||||
}
|
||||
|
||||
const tag = sequelize.define<Verify>("verify", {
|
||||
userID: {
|
||||
type: Sequelize.STRING,
|
||||
allowNull: false
|
||||
},
|
||||
uuid: {
|
||||
type: Sequelize.STRING,
|
||||
allowNull: false
|
||||
}
|
||||
})
|
||||
|
||||
export default tag
|
||||
@@ -1,10 +0,0 @@
|
||||
import { Schema, model } from "mongoose"
|
||||
|
||||
const waitinglistSchema = new Schema({
|
||||
_id: Schema.Types.ObjectId,
|
||||
userID: { type: String, required: true },
|
||||
uuid: { type: String, required: true },
|
||||
timestamp: { type: Number, required: true }
|
||||
})
|
||||
|
||||
export = model("waitinglist", waitinglistSchema, "waitinglist")
|
||||
25
src/schemas/waitinglistTag.ts
Normal file
25
src/schemas/waitinglistTag.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import Sequelize, { InferAttributes, InferCreationAttributes, Model } from "sequelize"
|
||||
import { sequelize } from "utils/Illegitimate"
|
||||
|
||||
interface WaitingList extends Model<InferAttributes<WaitingList>, InferCreationAttributes<WaitingList>> {
|
||||
userID: string;
|
||||
uuid: string;
|
||||
timestamp: number;
|
||||
}
|
||||
|
||||
const tag = sequelize.define<WaitingList>("waitingList", {
|
||||
userID: {
|
||||
type: Sequelize.STRING,
|
||||
allowNull: false
|
||||
},
|
||||
uuid: {
|
||||
type: Sequelize.STRING,
|
||||
allowNull: false
|
||||
},
|
||||
timestamp: {
|
||||
type: Sequelize.INTEGER,
|
||||
allowNull: false
|
||||
}
|
||||
})
|
||||
|
||||
export default tag
|
||||
Reference in New Issue
Block a user