SHARE
TWEET

Untitled

a guest Dec 9th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import mongoose, { Schema } from 'mongoose';
  2.  
  3. const RoleSchema = new Schema({
  4.     name: {
  5.         type:String,
  6.         required: true
  7.     },
  8.     code: {
  9.         type:String,
  10.         required: true
  11.     },
  12.     description: {
  13.         type:String,
  14.         required: true
  15.     },
  16.     createdAt: {
  17.         type: Date,
  18.         default: new Date
  19.     },
  20.     status: {
  21.         type: String,
  22.         required: true
  23.     }
  24. });
  25.  
  26. export default mongoose.model('Roles', RoleSchema);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top