const mongoose = require("mongoose");
// billType == 1 (orderpayment) if 2 then rechargePayment 
const BillHistorySchema = mongoose.Schema({
    merchantId: {
        type: String, 
    },  
    pgOrderId : {
        type: String,
    },  
    systemId : {
        type: String,
    },    
    orderId : {
        type: String,
    },  
    billType : {
        type: Number,
        // 1 = Order Payment, 2 = Admin Recharge manual, 3 = Payment Gateway
    },
    billAmt : {
        type: Number,
    },
    beforeAmt : {
        type: Number,
    },
    afterAmt : {
        type: Number,
    },
    crDate : {
        type : Date,
        default: Date.now, 
    },
    modDate : {
        type : Date,
        default: Date.now, 
    },
    comment : {
        type: String,
    }
});
module.exports = mongoose.model("BillHistorys", BillHistorySchema); 
 