fix: connect remaining sms pages to real backend

This commit is contained in:
hectorzhao
2026-07-02 19:30:04 +08:00
parent 06562e42dd
commit 131f344ac4
50 changed files with 2074 additions and 6400 deletions
+28
View File
@@ -7,6 +7,12 @@ export interface CreateTenantDto {
status?: string;
}
export interface UpdateTenantDto {
name?: string;
code?: string;
status?: string;
}
@Injectable()
export class TenantsService {
constructor(private readonly prisma: PrismaService) {}
@@ -31,4 +37,26 @@ export class TenantsService {
},
});
}
update(id: string, data: UpdateTenantDto) {
return this.prisma.tenant.update({
where: { id },
data: {
name: data.name,
code: data.code,
status: data.status,
},
});
}
changeStatus(id: string, status: string) {
return this.prisma.tenant.update({
where: { id },
data: { status },
});
}
delete(id: string) {
return this.changeStatus(id, 'deleted');
}
}