"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.userWalletHistoryCol = exports.userWalletCol = exports.topUpOrderCol = exports.roomsCol = exports.refundCol = exports.usersCol = exports.doctorCol = exports.timeSlotCol = exports.orderCol = exports.AccountStatus = exports.Role = exports.OrderStatus = void 0;
const firebase_admin_1 = require("firebase-admin");
const topup_order_model_1 = require("./model/topup_order_model");
const user_wallet_model_1 = require("./model/user_wallet_model");
var OrderStatus;
(function (OrderStatus) {
    OrderStatus["notPay"] = "notPay";
    OrderStatus["pay"] = "payment_success";
})(OrderStatus = exports.OrderStatus || (exports.OrderStatus = {}));
var Role;
(function (Role) {
    Role["Doctor"] = "doctor";
    Role["User"] = "user";
    Role["Admin"] = "admin";
})(Role = exports.Role || (exports.Role = {}));
var AccountStatus;
(function (AccountStatus) {
    AccountStatus["Active"] = "active";
    AccountStatus["NonActive"] = "nonactive";
})(AccountStatus = exports.AccountStatus || (exports.AccountStatus = {}));
const createCollection = (collectionName) => {
    return (0, firebase_admin_1.firestore)().collection(collectionName);
};
exports.orderCol = createCollection("Order");
exports.timeSlotCol = createCollection("DoctorTimeslot");
exports.doctorCol = createCollection("Doctors");
exports.usersCol = createCollection("Users");
exports.refundCol = createCollection("Refund");
exports.roomsCol = createCollection("Rooms");
exports.topUpOrderCol = createCollection("TopUpOrder").withConverter(topup_order_model_1.TopUpOrderModelConverter);
exports.userWalletCol = createCollection("UserWallet").withConverter(user_wallet_model_1.UserWalletModelConverter);
// Create a nested collection for userWallet/history/
const userWalletHistoryCol = (userWalletId) => {
    const userWalletRef = (0, firebase_admin_1.firestore)().collection("UserWallet").doc(userWalletId);
    return userWalletRef
        .collection("History")
        .withConverter(user_wallet_model_1.UserWalletHistoryConverter);
};
exports.userWalletHistoryCol = userWalletHistoryCol;
//# sourceMappingURL=collections.js.map