mirror of
https://github.com/Ratstail91/sineQL.git
synced 2025-11-29 10:44:28 +11:00
Moved to using a real database ORM for testing
This commit is contained in:
24
test/database/models/books.js
Normal file
24
test/database/models/books.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const Sequelize = require('sequelize');
|
||||
const sequelize = require('..');
|
||||
|
||||
module.exports = sequelize.define('books', {
|
||||
id: {
|
||||
type: Sequelize.INTEGER(11),
|
||||
allowNull: false,
|
||||
autoIncrement: true,
|
||||
primaryKey: true,
|
||||
unique: true
|
||||
},
|
||||
|
||||
title: {
|
||||
type: Sequelize.TEXT
|
||||
},
|
||||
|
||||
published: {
|
||||
type: Sequelize.TEXT
|
||||
},
|
||||
|
||||
rating: {
|
||||
type: Sequelize.FLOAT
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user