@serinushealth/schemas-shared

1.2.1 • Public • Published

Serinus Shared Schemas

Publish package to NPM

Serinus Health private schema for shared types in Mongoose.

Installation

$ npm install --save @serinus/schemas-shared

In Node.js:

const mongoose = require('mongoose')

require('mongoose-schema-jsonschema')(mongoose)

const { Schema } = mongoose
const { AddressType, PhoneType } = require('@serinus/schemas-shared')

const SampleSchema = new Schema({
  name: {
    type: String,
  },
  phones: {
    type: [PhoneType],
    default: undefined,
    required: [true, 'sample/phones'],
  },
  addresses: {
    type: [AddressType],
    default: undefined,
    required: [true, 'sample/addresses'],
  },
})

Package Sidebar

Install

npm i @serinushealth/schemas-shared

Weekly Downloads

1

Version

1.2.1

License

GPL-3.0

Unpacked Size

4.5 kB

Total Files

10

Last publish

Collaborators

  • buffolander