Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict';
- module.exports = function(sequelize, DataTypes) {
- let Order = sequelize.define('Order', {
- id: {
- allowNull: false,
- autoIncrement: true,
- primaryKey: true,
- type: DataTypes.INTEGER
- },
- seller_id: {
- type:DataTypes.STRING,
- allowNull:false
- },
- item_id: {
- type:DataTypes.STRING
- },
- price:{
- type:DataTypes.INTEGER,
- allowNull:false
- },
- total_order:{
- type:DataTypes.INTEGER,
- allowNull:false
- },
- receiver_id:{
- type:DataTypes.STRING,
- allowNull:false
- },
- couriers:{
- type:DataTypes.STRING,
- allowNull:false
- },
- total_price:{
- type:DataTypes.INTEGER,
- allowNull:false
- },
- }, {
- timestamp:true,
- createdAt:"created_at",
- updatedAt:"updated_at",
- tableName: 'order',
- classMethods: {
- associate: function(models) {
- }
- }
- });
- return Order;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement