@@ -12,17 +12,17 @@ import { convertFilter, convertParam } from './utils/converters.js';
1212import { getEnums } from './utils/get-enums.js' ;
1313
1414export class Resource extends BaseResource {
15- private client : PrismaClient ;
15+ protected client : PrismaClient ;
1616
17- private model : DMMF . Model ;
17+ protected model : DMMF . Model ;
1818
19- private enums : Enums ;
19+ protected enums : Enums ;
2020
21- private manager : ModelManager ;
21+ protected manager : ModelManager ;
2222
23- private propertiesObject : Record < string , Property > ;
23+ protected propertiesObject : Record < string , Property > ;
2424
25- private idProperty : Property ;
25+ protected idProperty : Property ;
2626
2727 constructor ( args : {
2828 model : DMMF . Model ;
@@ -96,7 +96,7 @@ export class Resource extends BaseResource {
9696 ) ;
9797 }
9898
99- private buildSortBy ( sort : { sortBy ?: string ; direction ?: 'asc' | 'desc' } = { } ) {
99+ protected buildSortBy ( sort : { sortBy ?: string ; direction ?: 'asc' | 'desc' } = { } ) {
100100 let { sortBy : path } = sort ;
101101 const { direction = 'desc' } = sort ;
102102
@@ -208,7 +208,7 @@ export class Resource extends BaseResource {
208208 ) ;
209209 }
210210
211- private prepareProperties ( ) : { [ propertyPath : string ] : Property } {
211+ protected prepareProperties ( ) : { [ propertyPath : string ] : Property } {
212212 const { fields = [ ] } = this . model ;
213213
214214 const properties = fields . reduce ( ( memo , field ) => {
@@ -232,7 +232,7 @@ export class Resource extends BaseResource {
232232 return properties ;
233233 }
234234
235- private prepareParams ( params : Record < string , any > ) : Record < string , any > {
235+ protected prepareParams ( params : Record < string , any > ) : Record < string , any > {
236236 const preparedParams : Record < string , any > = { } ;
237237
238238 for ( const property of this . properties ( ) ) {
@@ -268,7 +268,7 @@ export class Resource extends BaseResource {
268268 return preparedParams ;
269269 }
270270
271- private prepareReturnValues (
271+ protected prepareReturnValues (
272272 params : Record < string , any > ,
273273 ) : Record < string , any > {
274274 const preparedValues : Record < string , any > = { } ;
0 commit comments