Skip to content

Commit

Permalink
fix(docs): badge links & toc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukashroch committed Oct 13, 2022
1 parent be4b797 commit d6582fa
Showing 1 changed file with 31 additions and 54 deletions.
85 changes: 31 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,39 @@
# sequelize-typescript

[![Build Status](https://github.com/RobinBuschmann/sequelize-typescript/workflows/Node.js%20CI/badge.svg)](https://github.com/RobinBuschmann/sequelize-typescript/actions?query=workflow%3A%22Node.js+CI%22)
[![codecov](https://codecov.io/gh/RobinBuschmann/sequelize-typescript/branch/master/graph/badge.svg)](https://codecov.io/gh/RobinBuschmann/sequelize-typescript)
[![Build Status](https://github.com/sequelize/sequelize-typescript/workflows/Node.js%20CI/badge.svg)](https://github.com/sequelize/sequelize-typescript/actions?query=workflow%3A%22Node.js+CI%22)
[![codecov](https://codecov.io/gh/sequelize/sequelize-typescript/branch/master/graph/badge.svg)](https://codecov.io/gh/sequelize/sequelize-typescript)
[![NPM](https://img.shields.io/npm/v/sequelize-typescript.svg)](https://www.npmjs.com/package/sequelize-typescript)

Decorators and some other features for sequelize (v6).

- [sequelize-typescript](#sequelize-typescript)
- [Installation](#installation)
- [Sequelize Options](#sequelize-options)
- [Scopes Options](#scopes-options)
- [Model definition](#model-definition)
- [Less strict](#less-strict)
- [More strict](#more-strict)
- [`@Table`](#table)
- [Table API](#table-api)
- [Primary key](#primary-key)
- [`@CreatedAt`, `@UpdatedAt`, `@DeletedAt`](#createdat-updatedat-deletedat)
- [`@Column`](#column)
- [Column API](#column-api)
- [_Shortcuts_](#shortcuts)
- [Type inference](#type-inference)
- [Accessors](#accessors)
- [Usage](#usage)
- [Configuration](#configuration)
- [globs](#globs)
- [Model-path resolving](#model-path-resolving)
- [Build and create](#build-and-create)
- [Find and update](#find-and-update)
- [Model association](#model-association)
- [One-to-many](#one-to-many)
- [Many-to-many](#many-to-many)
- [Type safe _through_-table instance access](#type-safe-through-table-instance-access)
- [One-to-one](#one-to-one)
- [`@ForeignKey`, `@BelongsTo`, `@HasMany`, `@HasOne`, `@BelongsToMany` API](#foreignkey-belongsto-hasmany-hasone-belongstomany-api)
- [Multiple relations of same models](#multiple-relations-of-same-models)
- [Type safe usage of auto generated functions](#type-safe-usage-of-auto-generated-functions)
- [Indexes](#indexes)
- [`@Index`](#index)
- [Index API](#index-api)
- [`createIndexDecorator()`](#createindexdecorator)
- [Repository mode](#repository-mode)
- [How to enable repository mode?](#how-to-enable-repository-mode)
- [How to use repository mode?](#how-to-use-repository-mode)
- [How to use associations with repository mode?](#how-to-use-associations-with-repository-mode)
- [Limitations of repository mode](#limitations-of-repository-mode)
- [Model validation](#model-validation)
- [Exceptions](#exceptions)
- [Example](#example)
- [Scopes](#scopes)
- [`@DefaultScope` and `@Scopes`](#defaultscope-and-scopes)
- [Hooks](#hooks)
- [Why `() => Model`?](#why---model)
- [Recommendations and limitations](#recommendations-and-limitations)
- [One Sequelize instance per model (without repository mode)](#one-sequelize-instance-per-model-without-repository-mode)
- [One model class per file](#one-model-class-per-file)
- [Minification](#minification)
- [Contributing](#contributing)
- [Installation](#installation)
- [Model Definition](#model-definition)
- [`@Table` API](#table-api)
- [`@Column` API](#column-api)
- [Usage](#usage)
- [Configuration](#configuration)
- [globs](#globs)
- [Model-path resolving](#model-path-resolving)
- [Model association](#model-association)
- [One-to-many](#one-to-many)
- [Many-to-many](#many-to-many)
- [One-to-one](#one-to-one)
- [`@ForeignKey`, `@BelongsTo`, `@HasMany`, `@HasOne`, `@BelongsToMany` API](#foreignkey-belongsto-hasmany-hasone-belongstomany-api)
- [Generated getter and setter](#type-safe-usage-of-auto-generated-functions)
- [Multiple relations of same models](#multiple-relations-of-same-models)
- [Indexes](#indexes)
- [`@Index` API](#index)
- [`createIndexDecorator()` API](#createindexdecorator)
- [Repository mode](#repository-mode)
- [How to enable repository mode?](#how-to-enable-repository-mode)
- [How to use repository mode?](#how-to-use-repository-mode)
- [How to use associations with repository mode?](#how-to-use-associations-with-repository-mode)
- [Limitations of repository mode](#limitations-of-repository-mode)
- [Model validation](#model-validation)
- [Scopes](#scopes)
- [Hooks](#hooks)
- [Why `() => Model`?](#why---model)
- [Recommendations and limitations](#recommendations-and-limitations)

## Installation

Expand Down Expand Up @@ -244,7 +221,7 @@ used together with the @Column annotation to make some attribute options easier
| --------------------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `@AllowNull(allowNull?: boolean)` | sets `attribute.allowNull` (default is `true`) |
| `@AutoIncrement` | sets `attribute.autoIncrement=true` |
| `@Unique(options? UniqueOptions)` | sets `attribute.unique=true` | [UniqueOptions](https://github.com/RobinBuschmann/sequelize-typescript/blob/master/src/model/column/column-options/unique.ts#L3) |
| `@Unique(options? UniqueOptions)` | sets `attribute.unique=true` | [UniqueOptions](https://github.com/sequelize/sequelize-typescript/blob/master/src/model/column/column-options/unique.ts#L3) |
| `@Default(value: any)` | sets `attribute.defaultValue` to specified value |
| `@PrimaryKey` | sets `attribute.primaryKey=true` |
| `@Comment(value: string)` | sets `attribute.comment` to specified string |
Expand Down

0 comments on commit d6582fa

Please # to comment.