@bradtech/models
TypeScript icon, indicating that this package has built-in type declarations

1.2.427 • Public • Published

Models

This package contains all the models used in Brad Technology apps.

Getting started

yarn add @bradtech/models

OR

npm i @bradtech/models

Instantiating a model

import { BaseObject } from '@bradtech/models'

const myObject = BaseObject.create({
   name: 'myObject',
   status: 'active',
})

Using the Backend Adapter

import { ApplicationReference, FirestoreAdapter, Plot } from '@bradtech/models'

// Instantiate a Backend Adapter
const backendAdapter = new FirestoreAdapter()
backendAdapter.setUser(
   ApplicationReference.factory({
      ref: 'applications/app',
      label: 'My App',
   }),
)

// Saving myObject in our database
backendAdapter.create(myObject)

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @bradtech/models

Weekly Downloads

1

Version

1.2.427

License

MIT

Unpacked Size

411 kB

Total Files

205

Last publish

Collaborators

  • elliottlepine
  • crapougnax