Repository navigation
Open
Description
I'm using this issue as a way to track our progress on the merge with Sequelize-TypeScript:
This issue is related to #14298 and #14302, but does not replace them since these two issues remain the "end goal" (with some changes)
Here is the current progress:
- Hook decorators (feat: add model hook decorators #15333)
- base model declaration:
@Table,@Column& the ability to import models through the Sequelize constructor (feat: add@Attribute&@Tabledecorators #15336) -
@AllowNull,@AutoIncrement,@Comment,@Default,@PrimaryKey, Model validation decorators (feat: add@AllowNull,@AutoIncrement,@Comment,@Default,@PrimaryKey, and validation decorators #15384) -
@Unique(feat: add@Uniquedecorator, support specifying multiple unique indexes on the same attribute #15342) -
@Index&createIndexDecoratorfeat: add@Index,createIndexDecorator#15482 - Association decorators (HasOne, HasMany, BelongsTo, BelongsToMany),
@ForeignKeyfeat: add association decorators #15483 - Timestamp attributes
@DeletedAt,@CreatedAt,@UpdatedAt+@Version(feat: add timestamp & version attribute decorators #15767) -
@Scopes,@DefaultScope - Ensure decorators used on parent classes are inherited (where it makes sense) - Support inheritance for models (Concrete Table Inheritance) #6502 feat: add support for model inheritance #16095
-
$add,$set,$get,$count,$has,$removeand$createstatic methods (will be deprecated following the introduction of [RFC] Rework association methods for better TS support #14302) - Import the various PRs from https://github.com/sequelize/sequelize-typescript/pulls
A few notes
-
@Uniqueshould be able to be used multiple times on the same column (to make the column part of two different unique indexes) - We'll drop the "one model class per file" limitation when auto-importing models. We'll check all exported values. Similarly to what [RFC] Decorators #14298 proposed, we should support marking a model as abstract as a way to prevent actually registering it. Maybe using the
@AbstractTabledecorator - I think we should drop support for TS's
emitDecoratorMetadata - We won't import Repository Mode. Instead, we'll implement a real repository support Add support for Repositories / Data Mapper #15389
Reacted by Jin Yao, Enebz, Alden Quimby, Giuseppe Miragliotta and Arnaud CETOUTE
Activity
esetnik commentedon Dec 6, 2022
Please also track type changes introduced by #15400
WikiRik commentedon Dec 6, 2022
This issue is to track the progress of merging the sequelize-typescript package into sequelize itself. Tracking changes to the types is not done here, and with the work we've done on v7 only the big type changes are documented in the upgrade guide.