const { DataTypes } = require('sequelize');
const bcrypt = require('bcryptjs');
const db = require('../config/db.config');

const MiscTxn = db.define('MiscTxn', {
    id: {
        type: DataTypes.INTEGER,
        allowNull: false,
        autoIncrement: true,
        primaryKey: true
    },
    admin_id: {
        type: DataTypes.STRING,
        allowNull: true
    },
    initial_balance: {
        type: DataTypes.STRING,
        allowNull: true
    },
    withdraw_balance: {
        type: DataTypes.STRING,
        allowNull: true
    },
    withdraw_reason: {
        type: DataTypes.STRING,
        allowNull: true
    },
    withdraw_document: {
        type: DataTypes.STRING,
        allowNull: true
    },
    withdraw_manager: {
        type: DataTypes.STRING,
        allowNull: true
    },
    manager_owed: {
        type: DataTypes.STRING,
        allowNull: true
    },
    fill_balance: {
        type: DataTypes.STRING,
        allowNull: true
    },
    prev_balance: {
        type: DataTypes.STRING,
        allowNull: true
    },
    new_balance: {
        type: DataTypes.STRING,
        allowNull: true
    },
    gdtp: {
        type: DataTypes.STRING,
        allowNull: true
    },
    gdtr: {
        type: DataTypes.STRING,
        allowNull: true
    },
    gdfb: {
        type: DataTypes.STRING,
        allowNull: true
    },
    gdimage: {
        type: DataTypes.STRING,
        allowNull: true
    },
    fstp: {
        type: DataTypes.STRING,
        allowNull: true
    },
    fstr: {
        type: DataTypes.STRING,
        allowNull: true
    },
    fsfb: {
        type: DataTypes.STRING,
        allowNull: true
    },
    fsimage: {
        type: DataTypes.STRING,
        allowNull: true
    },
    rstp: {
        type: DataTypes.STRING,
        allowNull: true
    },
    rstr: {
        type: DataTypes.STRING,
        allowNull: true
    },
    rsfb: {
        type: DataTypes.STRING,
        allowNull: true
    },
    rsimage: {
        type: DataTypes.STRING,
        allowNull: true
    },
    fill_amount: {
        type: DataTypes.STRING,
        allowNull: true
    },
    fillimage: {
        type: DataTypes.STRING,
        allowNull: true
    },
    with_only: {
        type: DataTypes.STRING,
        allowNull: true
    },
    fill_only: {
        type: DataTypes.STRING,
        allowNull: true
    }
}, {
    tableName: 'misctxns',
    timestamps: true,
    createdAt: 'created_at',
    updatedAt: 'updated_at'
});

module.exports = MiscTxn;