import db from "$db/db"; import { DataTypes } from '@sequelize/core'; const attributes = { id: { type: DataTypes.INTEGER(11), allowNull: false, defaultValue: null, primaryKey: true, autoIncrement: true, comment: null, field: "id" }, a1_id: { type: DataTypes.INTEGER(11), allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "a1_id" }, a2_id: { type: DataTypes.INTEGER(11), allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "a2_id" }, user_id: { type: DataTypes.INTEGER(11), allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "user_id" }, completedAt: { type: DataTypes.DATE, allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "completedAt" }, createdAt: { type: DataTypes.DATE, allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "createdAt" }, updatedAt: { type: DataTypes.DATE, allowNull: false, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "updatedAt" }, v1: { type: DataTypes.DOUBLE, allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "v1" }, v2: { type: DataTypes.DOUBLE, allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "v2" }, rate: { type: DataTypes.DOUBLE, allowNull: true, defaultValue: null, primaryKey: false, autoIncrement: false, comment: null, field: "rate" }, accepted: { type: DataTypes.BOOLEAN, allowNull: false, defaultValue: false, primaryKey: false, autoIncrement: false, comment: null, field: "accepted" }, }; const options = { tableName: "orders", comment: "", indexes: [] }; db.Order = db.define("orders_model", attributes, options);