import { Schema } from "mongoose"; import { getCommonSchemas as common,aliasedEntitySchemaOpts as opts} from "@onebro/oba-common"; import { FinavigatorTask } from "../types"; const {status} = common(); const task = new Schema({ created:{type:Date,default:Date.now}, updated:{type:Date,default:Date.now}, status:{type:[status],default:() => [{name:"N",time:new Date()}]}, author:{type:Schema.Types.ObjectId}, type:{type:String}, title:{type:String}, slug:{type:String}, featured:{type:Boolean,default:false}, body:{type:String}, tags:{type:[Schema.Types.Mixed],default:[] as any[]}, views:{type:Number,default:0}, },opts); export {task as finavigatorTaskSchema};