0.4.10 • Published 9 years ago

typedsequelize v0.4.10

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

TypedSequelize

typescript source generator for sequelize & rpc
Code First model

How to use

Model Definition

Just declare & implement class.
Not support inherit now
Not support n:m relation now

@model
export class Person {
    first_name: string;
    last_name: string;
    age: number;
}

Source generation

run bin/cli.js
node bin/cli.js --outdir src/gen --inputs src/def/person.ts

src/gen/person_models.ts will be generated.

Now you can use Person in src/gen/person_models.

or you can use typedseq.json as config file.
below is an example that works same with above command.

{
  "outdir": "src/gen",
  "inputs": [
    "src/def/person.ts"
  ]
}

jsut run node bin/cli.js

Decorators

  • concreteType()
    • Specify Sequelize Type
  • embededField()
    • Each fields are saved into seperated fields.
  • primaryKey()
    • Set decorated property as primary key
  • arrayJoinedWith(seperator: string)
    • Array is saved with specified seperator

TODO

See Issues page

0.4.10

9 years ago

0.4.9

9 years ago

0.4.8

9 years ago

0.4.7

9 years ago

0.4.6

9 years ago

0.4.5

9 years ago

0.4.4

9 years ago

0.4.3

9 years ago

0.4.2

9 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.4

10 years ago

0.3.3

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.2

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

1.0.0

10 years ago