Model segments


Permissions

User GroupCreate?Read?Update?Delete?
adminxxxx
userx

Fields

NameTypeLinkMaps ToDefaultIndexed?Unique?Required?
__vNumber
_deletedBooleanfalsex
_idObjectID[Function]
_owner_idObjectIDUser_ownerx
_updated_by_idObjectIDUser_updated_byx
conditionsArray[Function]
createdAtDate[Function]x
createdByStringx
customerCountNumber0
descriptionString
isActiveBooleantruex
nameStringxxx
updatedAtDate[Function]x

Field Details

__v

{
  "path": "__v",
  "instance": "Number",
  "options": {},
  "validators": []
}

_deleted

{
  "path": "_deleted",
  "instance": "Boolean",
  "options": {
    "default": false,
    "index": true
  },
  "validators": [],
  "defaultValue": false
}

_id

{
  "path": "_id",
  "instance": "ObjectID",
  "options": {
    "auto": true,
    "type": "ObjectId"
  },
  "validators": [],
  "defaultValue": "[Function]"
}

_owner_id

{
  "path": "_owner_id",
  "instance": "ObjectID",
  "options": {
    "link": "User",
    "map_to": "_owner",
    "index": true
  },
  "validators": []
}

_updated_by_id

{
  "path": "_updated_by_id",
  "instance": "ObjectID",
  "options": {
    "link": "User",
    "map_to": "_updated_by",
    "index": true
  },
  "validators": []
}

conditions

{
  "path": "conditions",
  "instance": "Array",
  "options": {
    "type": [
      {
        "id": {
          "index": true
        },
        "field": {
          "required": true
        },
        "operator": {
          "required": true,
          "enum": [
            "equals",
            "not_equals",
            "contains",
            "not_contains",
            "starts_with",
            "ends_with",
            "greater_than",
            "less_than",
            "greater_than_or_equal",
            "less_than_or_equal",
            "in",
            "not_in",
            "is_null",
            "is_not_null",
            "date_before",
            "date_after",
            "date_between"
          ]
        },
        "logicalOperator": {
          "enum": [
            "AND",
            "OR"
          ],
          "default": "AND"
        }
      }
    ],
    "default": []
  },
  "validators": [],
  "defaultValue": "[Function]"
}

createdAt

{
  "path": "createdAt",
  "instance": "Date",
  "options": {
    "index": true
  },
  "validators": [],
  "defaultValue": "[Function]"
}

createdBy

{
  "path": "createdBy",
  "instance": "String",
  "options": {
    "index": true
  },
  "validators": []
}

customerCount

{
  "path": "customerCount",
  "instance": "Number",
  "options": {
    "default": 0
  },
  "validators": [],
  "defaultValue": 0
}

description

{
  "path": "description",
  "instance": "String",
  "options": {},
  "validators": []
}

isActive

{
  "path": "isActive",
  "instance": "Boolean",
  "options": {
    "default": true,
    "index": true
  },
  "validators": [],
  "defaultValue": true
}

name

{
  "path": "name",
  "instance": "String",
  "options": {
    "unique": true,
    "required": true,
    "index": true
  },
  "validators": [
    {
      "message": "Path `{PATH}` is required."
    }
  ],
  "isRequired": true
}

Validators

updatedAt

{
  "path": "updatedAt",
  "instance": "Date",
  "options": {
    "index": true
  },
  "validators": [],
  "defaultValue": "[Function]"
}