Skip to content

tradle/build-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@tradle/build-model

Usage

// example.js
const builders = require('@tradle/build-model')
const model = builders.model({ models })
  .id('tradle.BlahProduct')
  .subClassOf('tradle.FinancialProduct')
  .forms(['tradle.AboutYou'])
  .properties({
    blah: builders.property()
      .type('string')
      .readOnly(true)
      .title('No, really, blah'),

    blahblah: builders.property()
      .type('date'),
      
    blahblahblah: builders.property()
      .type('object')
      .ref('tradle.Photo')
  })
  .toJSON()

console.log(JSON.stringify(model, null, 2))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published