clay-schemas

4.1.1 • Public • Published

clay-schemas

Build Status npm Version JS Standard

Schemas for ClayDB

Installation

$ npm install clay-schemas --save

Schemas

Examples

Example Entity
{
  "id": "9a9cfbd9e15447239c1b5434c7b9ab27",
  "$$at": "2017-03-03T02:35:04.349Z"
}
Example Policy
{
  "username": {
    "type": "STRING",
    "minLength": 2,
    "required": true,
    "unique": true
  },
  "birthday": {
    "type": "DATE"
  },
  "createdAt": {
    "type": "DATE",
    "default": "2012/12/12"
  },
  "orgId": {
    "type": "STRING"
  },
  "memberIndex": {
    "type": "NUMBER",
    "uniqueFor": [
      "orgId"
    ]
  },
  "pointer01": {
    "type": [
      "REF",
      "ENTITY"
    ]
  }
}
Example Resource
{
  "name": "example-users",
  "domain": "example.com",
  "description": "Example resource of users"
}

License

This software is released under the Apache-2.0 License.

Links

Readme

Keywords

Package Sidebar

Install

npm i clay-schemas

Weekly Downloads

6

Version

4.1.1

License

Apache-2.0

Last publish

Collaborators

  • realglobe