添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I used the example of readme file, and after the server starts I got the error ReferenceError: Schema is not defined

  static schema () {
    return {
      username: String,
      childs: [{
       type: Schema.ObjectId,
        ref: 'UserSchema'
      email: {
        type: String,
        type: String,
        required: true,
        unique: true,
        lowercase: true,
        trim: true,
        validate: {
          validator: function (val) {
            return isEmail(val)
          message: '{VALUE} is not a valid email'

apparently the scope of the schema variable, has been lost