import { Sequelize } from 'sequelize';
import { dbConnectMySQL } from '../utilities';

// Создание sql-таблицы balances
export const Ticker_SQL = dbConnectMySQL.define('ticker', {
	id: {
		type: Sequelize.INTEGER,
		autoIncrement: true,
		primaryKey: true,
		allowNull: false,
	},
	exchangeId: { type: Sequelize.STRING, allowNull: false }, // "BinanceID", "HuobiID", "OkxID"
	exchange: { type: Sequelize.STRING, allowNull: false },
	typeMarket: {
		type: Sequelize.ENUM,
		values: ['SPOT', 'FUT'],
		allowNull: false,
	},
	askPrice: { type: Sequelize.STRING }, // цена продажи
	bidPrice: { type: Sequelize.STRING }, // цена покупки
	baseAsset: { type: Sequelize.STRING, allowNull: false }, // coin
	quoteAsset: { type: Sequelize.STRING, allowNull: false }, // stable Coin - USDT || USDC
	fundRate: { type: Sequelize.STRING }, // funding rate для фьючей,
});
