@foxify/odin
Active Record Model
Last updated a year ago by ardalanamini .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @foxify/odin 
SYNC missed versions from official npm registry.

Odin

Odin is an implementation of Active Record pattern in TypeScript.

NPM Version Node Version TypeScript Version Tested With Jest Pull Requests License Build Status Coverage Status Package Quality Dependencies Status NPM Total Downloads NPM Monthly Downloads Open Issues Closed Issues known vulnerabilities Github Stars Github Forks

Table of Content

Installation

Before installing, download and install Node.js. Node.js 8 or higher is required.

npm i -s @foxify/odin

Usage

const Odin = require("@foxify/odin");

const { Types } = Odin;

class User extends Odin {
}

User.schema = {
  email: Types.String.email.required,
  name: {
    first: Types.String.min(3).required,
    last: Types.String.min(3),
  }
};

Features

  1. Written in ES6
  2. TypeScript ready
  3. Active Record pattern
  4. Schema validation
  5. GraphQL Schema generator (based on model schema)
  6. JSON Schema generator (based on model schema)

TODO (RoadMap to version 1.0.0)

  • [x] Schema validation
  • [ ] Model
    • [ ] Hooks
      • [x] create
      • [ ] update
      • [ ] delete
      • [ ] restore
    • [ ] Relationships
      • [x] embedMany
      • [x] hasMany
      • [x] hasOne
      • [ ] hasManyThrough
      • [ ] hasOneThrough
      • [ ] Polymorphic
        • [x] morphMany
        • [x] morphOne
        • [ ] morphTo
        • [ ] morphManyThrough
        • [ ] morphOneThrough
        • [ ] morphToThrough
      • [x] CRUD operations
        • [x] Create operation
        • [x] Read operation
        • [x] Update operation
        • [x] Delete operation
    • [x] GraphQL support
    • [x] JSON Schema support
  • [ ] Migrations
  • [ ] Seeding
  • [ ] Tests

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Changelog

See the CHANGELOG.md file for details

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Support

If my work helps you, please consider

Buy Me A Coffee Become A Patron

Current Tags

  • 0.9.4                                ...           latest (a year ago)

50 Versions

  • 0.9.4                                ...           a year ago
  • 0.9.3                                ...           a year ago
  • 0.9.2                                ...           a year ago
  • 0.9.1                                ...           a year ago
  • 0.9.0                                ...           a year ago
  • 0.8.0                                ...           a year ago
  • 0.7.5                                ...           a year ago
  • 0.7.4                                ...           a year ago
  • 0.7.3                                ...           a year ago
  • 0.7.2                                ...           a year ago
  • 0.7.1                                ...           a year ago
  • 0.7.0                                ...           a year ago
  • 0.6.2                                ...           a year ago
  • 0.6.1                                ...           a year ago
  • 0.6.0                                ...           a year ago
  • 0.5.4                                ...           a year ago
  • 0.5.3                                ...           a year ago
  • 0.5.2                                ...           2 years ago
  • 0.5.1                                ...           2 years ago
  • 0.5.0                                ...           2 years ago
  • 0.4.1                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.1.0-beta.20                                ...           2 years ago
  • 0.1.0-beta.19                                ...           2 years ago
  • 0.1.0-beta.18                                ...           2 years ago
  • 0.1.0-beta.17                                ...           2 years ago
  • 0.1.0-beta.16                                ...           2 years ago
  • 0.1.0-beta.15                                ...           2 years ago
  • 0.1.0-beta.14                                ...           2 years ago
  • 0.1.0-beta.13                                ...           2 years ago
  • 0.1.0-beta.12                                ...           2 years ago
  • 0.1.0-beta.11                                ...           2 years ago
  • 0.1.0-beta.10                                ...           2 years ago
  • 0.1.0-beta.9                                ...           2 years ago
  • 0.1.0-beta.8                                ...           2 years ago
  • 0.1.0-beta.7                                ...           2 years ago
  • 0.1.0-beta.6                                ...           2 years ago
  • 0.1.0-beta.5                                ...           2 years ago
  • 0.1.0-beta.4                                ...           2 years ago
  • 0.1.0-beta.2                                ...           2 years ago
  • 0.1.0-beta.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 51
Dependencies (13)
Dev Dependencies (13)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |