@rapidd/build 1.2.2 → 1.2.3
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.
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@ class ${className} extends Model {
|
|
|
28
28
|
* @param {number} offset
|
|
29
29
|
* @param {string} sortBy
|
|
30
30
|
* @param {'asc'|'desc'} sortOrder
|
|
31
|
-
* @returns {Object[]}
|
|
31
|
+
* @returns {Promise<Object[]>}
|
|
32
32
|
*/
|
|
33
33
|
async getMany(q = {}, include = "", limit = 25, offset = 0, sortBy = "id", sortOrder = "asc"){
|
|
34
34
|
return await this._getMany(q, include, Number(limit), Number(offset), sortBy, sortOrder);
|
|
@@ -37,7 +37,7 @@ class ${className} extends Model {
|
|
|
37
37
|
/**
|
|
38
38
|
* @param {number} id
|
|
39
39
|
* @param {string | Object} include
|
|
40
|
-
* @returns {
|
|
40
|
+
* @returns {Promise<Object | null>}
|
|
41
41
|
*/
|
|
42
42
|
async get(id, include){
|
|
43
43
|
return await this._get(id, include);
|
|
@@ -45,7 +45,7 @@ class ${className} extends Model {
|
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* @param {Object} data
|
|
48
|
-
* @returns {Object}
|
|
48
|
+
* @returns {Promise<Object>}
|
|
49
49
|
*/
|
|
50
50
|
async create(data){
|
|
51
51
|
return await this._create(data);
|
|
@@ -54,7 +54,7 @@ class ${className} extends Model {
|
|
|
54
54
|
/**
|
|
55
55
|
* @param {number} id
|
|
56
56
|
* @param {{}} data
|
|
57
|
-
* @returns {Object}
|
|
57
|
+
* @returns {Promise<Object>}
|
|
58
58
|
*/
|
|
59
59
|
async update(id, data){
|
|
60
60
|
return await this._update(id, data);
|
|
@@ -92,6 +92,8 @@ class ${className} extends Model {
|
|
|
92
92
|
include(include){
|
|
93
93
|
return this._include(include);
|
|
94
94
|
}
|
|
95
|
+
|
|
96
|
+
static QueryBuilder = new QueryBuilder('${modelName}');
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
module.exports = {${className}, QueryBuilder, prisma};
|