refactor(db/models): remove reviews field from chapter type

kinda redundant since there's also `IStory.reviews` :/
This commit is contained in:
parent ad8be9d7fa
commit e23faf84d4
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -1,5 +1,5 @@
import mongoose, {Schema, PopulatedDoc, Document, Model} from "mongoose";
import { IBand } from "../band";
import mongoose, { Schema, PopulatedDoc, Document, Model } from "mongoose";
import { IBand } from "~/models/band";
export interface IChapter {
title: string;
summary: string;
@ -14,52 +14,52 @@ export interface IChapter {
nsfw: boolean;
loggedInOnly: boolean;
hidden: boolean;
posted: Date;
reviews: number
posted?: Date;
}
export const Chapter = new mongoose.Schema<IChapter>({
title: {
type: String,
default: ""
default: "",
},
id: {
type: Number
type: Number,
},
summary: {
type: String
type: String,
},
words: {
type: Number
type: Number,
},
notes: {
type: String
},
genre: [{
type: String
}],
bands: [{
type: Number,
ref: "Band"
}],
reviews: {
type: Number
type: String,
},
genre: [
{
type: String,
},
],
bands: [
{
type: Number,
ref: "Band",
},
],
characters: [{ type: String }],
relationships: [{ type: String }],
relationships: [[{ type: String }]],
nsfw: {
type: Boolean
type: Boolean,
},
loggedInOnly: {
type: Boolean,
default: true
default: true,
},
hidden: {
type: Boolean,
default: false
default: false,
},
posted: {
type: Date,
default: new Date()
}
})
default: new Date(),
},
});