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