Sha256: f2a4a8ddc744e94202f84ee358239e4735d8119e9baf4ac2ed8a4b734a7b1915
Contents?: true
Size: 866 Bytes
Versions: 16
Compression:
Stored size: 866 Bytes
Contents
const mongoose = require('mongoose/browser'); const [Schema, String, Boolean] = [ mongoose.Schema, mongoose.Schema.Types.String, mongoose.Schema.Types.Boolean, ]; const AddressSchema = new mongoose.Schema({ street: [String], city: String, state: String, zip: String, country: String, use: String, }); const TelecomSchema = new mongoose.Schema({ use: String, value: String, preferred: Boolean, }); const ProviderSchema = new Schema({ _type: { type: String, default: 'Provider' }, givenNames: [String], familyName: String, specialty: String, title: String, addresses: [AddressSchema], telecoms: [TelecomSchema], }, { id: false }); module.exports.ProviderSchema = ProviderSchema; class Provider extends mongoose.Document { constructor(object) { super(object, ProviderSchema); } } module.exports.Provider = Provider;
Version data entries
16 entries across 16 versions & 1 rubygems