feat: Add tenant table/logic (#50)

This commit is contained in:
Mostapha El Sabah 2025-01-14 22:29:24 -05:00 committed by GitHub
parent a37a57b437
commit fd705aecc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 92 additions and 3 deletions

View file

@ -41,6 +41,15 @@ export default ts.config(
caughtErrorsIgnorePattern: '^_',
},
],
'no-restricted-syntax': [
'error',
{
selector:
'CallExpression:matches([callee.object.object.name="prisma"], [callee.object.object.name="prismaTransactionClient"], [callee.object.object.name="transactionClient"]):matches([callee.property.name="findFirst"], [callee.property.name="findMany"], [callee.property.name="updateMany"], [callee.property.name="deleteMany"], [callee.property.name="count"], [callee.property.name="aggregate"], [callee.property.name="groupBy"]):not(:has(ObjectExpression > Property[key.name="where"] > ObjectExpression > Property[key.name="tenantId"]))',
message:
'Please filter on the current tenant when using findFirst, findMany, updateMany, deleteMany, count, aggregate or groupBy.',
},
],
},
}
);