@riocrypto/common 1.0.379 → 1.0.381
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,6 +12,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.buildAdminAuth = void 0;
|
|
13
13
|
const password_1 = require("../services/password");
|
|
14
14
|
const buildAdminAuth = (mongoose) => {
|
|
15
|
+
// if model is already defined, return it
|
|
16
|
+
if (mongoose.models.AdminAuth) {
|
|
17
|
+
return mongoose.models.AdminAuth;
|
|
18
|
+
}
|
|
15
19
|
const AdminSchema = new mongoose.Schema({
|
|
16
20
|
email: {
|
|
17
21
|
type: String,
|
package/build/models/auth.js
CHANGED
|
@@ -12,6 +12,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.buildAuth = void 0;
|
|
13
13
|
const password_1 = require("../services/password");
|
|
14
14
|
const buildAuth = (mongoose) => {
|
|
15
|
+
// if model is already defined, return it
|
|
16
|
+
if (mongoose.models.Auth) {
|
|
17
|
+
const x = mongoose.models.Auth;
|
|
18
|
+
}
|
|
15
19
|
const AuthSchema = new mongoose.Schema({
|
|
16
20
|
phoneNumber: {
|
|
17
21
|
type: String,
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildBankPayout = void 0;
|
|
4
4
|
const buildBankPayout = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.BankPayout) {
|
|
7
|
+
return mongoose.models.BankPayout;
|
|
8
|
+
}
|
|
5
9
|
const BankPayoutSchema = new mongoose.Schema({
|
|
6
10
|
orderId: {
|
|
7
11
|
type: String,
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildBusinessUser = void 0;
|
|
4
4
|
const buildBusinessUser = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.BusinessUser) {
|
|
7
|
+
return mongoose.models.BusinessUser;
|
|
8
|
+
}
|
|
5
9
|
const BusinessUserSchema = new mongoose.Schema({
|
|
6
10
|
type: {
|
|
7
11
|
type: String,
|
package/build/models/order.js
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildOrder = void 0;
|
|
4
4
|
const buildOrder = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.Order) {
|
|
7
|
+
return mongoose.models.Order;
|
|
8
|
+
}
|
|
5
9
|
const orderSchema = new mongoose.Schema({
|
|
6
10
|
userId: {
|
|
7
11
|
type: String,
|
package/build/models/partner.js
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildPartner = void 0;
|
|
4
4
|
const buildPartner = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.Partner) {
|
|
7
|
+
return mongoose.models.Partner;
|
|
8
|
+
}
|
|
5
9
|
const PartnerSchema = new mongoose.Schema({
|
|
6
10
|
name: {
|
|
7
11
|
type: String,
|
package/build/models/user.js
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildUser = void 0;
|
|
4
4
|
const buildUser = (mongoose) => {
|
|
5
|
+
// if model is already defined, return it
|
|
6
|
+
if (mongoose.models.User) {
|
|
7
|
+
return mongoose.models.User;
|
|
8
|
+
}
|
|
5
9
|
const userSchema = new mongoose.Schema({
|
|
6
10
|
type: {
|
|
7
11
|
type: String,
|