Odin is an implementation of Active Record pattern in TypeScript.
- Installation
- Usage
- Features
- TODO (RoadMap to version 1.0.0)
- Versioning
- Changelog
- Authors
- License
- Support
Before installing, download and install Node.js. Node.js 8 or higher is required.
npm i -s @foxify/odin
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),
}
};
- Written in
ES6
TypeScript
readyActive Record
patternSchema
validationGraphQL Schema
generator (based on model schema)JSON Schema
generator (based on model schema)
-
Schema
validation - Model
- Hooks
-
create
-
update
-
delete
-
restore
-
- Relationships
-
embedMany
-
hasMany
-
hasOne
-
hasManyThrough
-
hasOneThrough
-
Polymorphic
-
morphMany
-
morphOne
-
morphTo
-
morphManyThrough
-
morphOneThrough
-
morphToThrough
-
- CRUD operations
- Create operation
- Read operation
- Update operation
- Delete operation
-
-
GraphQL
support -
JSON Schema
support
- Hooks
- Migrations
- Seeding
- Tests
We use SemVer for versioning. For the versions available, see the tags on this repository.
See the CHANGELOG.md file for details
- Ardalan Amini - Core Maintainer - @ardalanamini
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details
If my work helps you, please consider