Advertisement
addityarivaldo

Order (Models)

Feb 7th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'use strict';
  2. module.exports = function(sequelize, DataTypes) {
  3.   let Order = sequelize.define('Order', {
  4.     id: {
  5.       allowNull: false,
  6.       autoIncrement: true,
  7.       primaryKey: true,
  8.       type: DataTypes.INTEGER
  9.     },
  10.     seller_id: {
  11.       type:DataTypes.STRING,
  12.       allowNull:false
  13.     },
  14.     item_id: {
  15.       type:DataTypes.STRING
  16.     },
  17.     price:{
  18.       type:DataTypes.INTEGER,
  19.       allowNull:false
  20.     },
  21.     total_order:{
  22.       type:DataTypes.INTEGER,
  23.       allowNull:false
  24.     },
  25.     receiver_id:{
  26.       type:DataTypes.STRING,
  27.       allowNull:false
  28.     },
  29.     couriers:{
  30.       type:DataTypes.STRING,
  31.       allowNull:false
  32.     },
  33.     total_price:{
  34.       type:DataTypes.INTEGER,
  35.       allowNull:false
  36.     },
  37.    
  38.   }, {
  39.     timestamp:true,
  40.     createdAt:"created_at",
  41.     updatedAt:"updated_at",
  42.     tableName: 'order',
  43.     classMethods: {
  44.       associate: function(models) {
  45.        
  46.       }
  47.  
  48.     }
  49.   });
  50.   return Order;
  51. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement