update models and create consumer domain accounts permissions

This commit is contained in:
2026-04-11 14:47:05 +03:30
parent 89726c8904
commit 9cef733370
87 changed files with 2967 additions and 3352 deletions
@@ -34,7 +34,7 @@ export class CustomerSaleInvoicesService {
account: {
select: {
role: true,
user: {
consumer: {
select: {
first_name: true,
last_name: true,
@@ -50,13 +50,13 @@ export class CustomerSaleInvoicesService {
created_at: true,
}
async findAll(user_id: string, customer_id: string, page = 1, pageSize = 10) {
async findAll(consumer_id: string, customer_id: string, page = 1, pageSize = 10) {
const salesWhere: SalesInvoiceWhereInput = {
customer_id,
pos: {
complex: {
business_activity: {
user_id,
consumer_id,
},
},
},
@@ -96,7 +96,7 @@ export class CustomerSaleInvoicesService {
})
}
async findOne(user_id: string, customer_id: string, id: string) {
async findOne(consumer_id: string, customer_id: string, id: string) {
const account = await this.prisma.salesInvoice.findUniqueOrThrow({
where: {
id,
@@ -104,7 +104,7 @@ export class CustomerSaleInvoicesService {
pos: {
complex: {
business_activity: {
user_id,
consumer_id,
},
},
},