Skip to content

Instantly share code, notes, and snippets.

@daniloab
Last active June 12, 2019 17:52
Show Gist options
  • Save daniloab/1f41723fb405b240123efd57d9699481 to your computer and use it in GitHub Desktop.
Save daniloab/1f41723fb405b240123efd57d9699481 to your computer and use it in GitHub Desktop.
Simple example team model
const teamSchema = new Schema({
name: {
type: String,
required: 'name is required',
},
tradeName: {
type: String,
required: 'trade name is required',
},
taxId: {
type: String,
required: 'tax number is required'
}
}, { timestamps: true });
export default mongoose.model('Team', teamSchema)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment