-
-
Save championswimmer/c818d85d34badeb46a4903278f4d1be0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as Sequelize from 'sequelize' | |
import {DataTypes} from 'sequelize' | |
import * as config from '../../config' | |
import {ClientAttributes, clientAttrs, ClientInstance} from './models/Client' | |
import {ProductCategoryAttributes, productCategoryAttrs, ProductCategoryInstance} from './models/ProductCategory' | |
import {TaxAttributes, taxAttrs, TaxInstance} from './models/Tax' | |
const db = new Sequelize( | |
config.DB.NAME, | |
config.DB.USER, | |
config.DB.PASSWORD, | |
{ | |
dialect: 'postgres' | |
} | |
) | |
export const Clients = | |
db.define<ClientInstance, ClientAttributes>('clients', clientAttrs) | |
export const ProductCategories = | |
db.define<ProductCategoryInstance, ProductCategoryAttributes>( | |
'product_categories', | |
productCategoryAttrs | |
) | |
export const Tax = | |
db.define<TaxInstance, TaxAttributes>( | |
'tax', | |
taxAttrs | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment