Skip to content

mchlbataller/schema-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SchemaConstructor

Started as a series of objects but got increasingly large to accommodate multiple requirements.

Somewhat looks like Joi, same usage.

Usage

import { Schema } from "mongoose";
import { schemaTypes } from "_utils/database/schemaTypes.ts";

const SomeSchema = new Schema({
	someRequiredStringField: schemaTypes.string().required(),
	someRequiredObjectIdField: schemaTypes.objectId().ref(SomeModel),
});

Created by Michael with <3

About

Mongoose Schema provider

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages