```
update Implement standardized documentation for all database modules, including purpose, rules, and requirements for each CRUD operation; refactor existing comments to follow new documentation standard ```
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
// api method for crate customer record
|
||||
// PURPOSE:
|
||||
// Create new customer record
|
||||
// REQ0006
|
||||
//
|
||||
// RULES:
|
||||
// TBA
|
||||
// error handled by caller
|
||||
// contain definition to collection only
|
||||
//
|
||||
import { pb } from '@/lib/pb';
|
||||
import { COL_CUSTOMERS } from '@/constants';
|
||||
import type { CreateFormProps } from '@/components/dashboard/customer/type.d';
|
||||
|
@@ -1,3 +1,12 @@
|
||||
// PURPOSE:
|
||||
// Delete customer record
|
||||
// REQ0006
|
||||
//
|
||||
// RULES:
|
||||
// error handled by caller
|
||||
// contain definition to collection only
|
||||
//
|
||||
|
||||
import { pb } from '@/lib/pb';
|
||||
import { COL_CUSTOMERS } from '@/constants';
|
||||
|
||||
|
@@ -1,3 +1,12 @@
|
||||
// PURPOSE:
|
||||
// Get count of active customers
|
||||
// REQ0006
|
||||
//
|
||||
// RULES:
|
||||
// error handled by caller
|
||||
// contain definition to collection only
|
||||
//
|
||||
|
||||
import { COL_USER_METAS } from '@/constants';
|
||||
|
||||
import { pb } from '@/lib/pb';
|
||||
|
@@ -1,3 +1,12 @@
|
||||
// PURPOSE:
|
||||
// Get all customer records
|
||||
// REQ0006
|
||||
//
|
||||
// RULES:
|
||||
// error handled by caller
|
||||
// contain definition to collection only
|
||||
//
|
||||
|
||||
import { pb } from '@/lib/pb';
|
||||
import { COL_CUSTOMERS } from '@/constants';
|
||||
import type { RecordModel } from 'pocketbase';
|
||||
|
@@ -1,3 +1,12 @@
|
||||
// PURPOSE:
|
||||
// Get total count of all customers
|
||||
// REQ0006
|
||||
//
|
||||
// RULES:
|
||||
// error handled by caller
|
||||
// contain definition to collection only
|
||||
//
|
||||
|
||||
import { pb } from '@/lib/pb';
|
||||
import { COL_CUSTOMERS } from '@/constants';
|
||||
|
||||
|
@@ -1,3 +1,12 @@
|
||||
// PURPOSE:
|
||||
// Get count of blocked customers
|
||||
// REQ0006
|
||||
//
|
||||
// RULES:
|
||||
// error handled by caller
|
||||
// contain definition to collection only
|
||||
//
|
||||
|
||||
import { COL_USER_METAS } from '@/constants';
|
||||
|
||||
import { pb } from '@/lib/pb';
|
||||
|
@@ -1,3 +1,12 @@
|
||||
// PURPOSE:
|
||||
// Get customer record by ID
|
||||
// REQ0006
|
||||
//
|
||||
// RULES:
|
||||
// error handled by caller
|
||||
// contain definition to collection only
|
||||
//
|
||||
|
||||
import { pb } from '@/lib/pb';
|
||||
import { COL_CUSTOMERS } from '@/constants';
|
||||
import type { RecordModel } from 'pocketbase';
|
||||
|
@@ -1,3 +1,12 @@
|
||||
// PURPOSE:
|
||||
// Get count of pending customers
|
||||
// REQ0006
|
||||
//
|
||||
// RULES:
|
||||
// error handled by caller
|
||||
// contain definition to collection only
|
||||
//
|
||||
|
||||
import { COL_USER_METAS } from '@/constants';
|
||||
|
||||
import { pb } from '@/lib/pb';
|
||||
|
@@ -1,3 +1,12 @@
|
||||
// PURPOSE:
|
||||
// Sample hello world function
|
||||
// REQ0006
|
||||
//
|
||||
// RULES:
|
||||
// error handled by caller
|
||||
// contain definition to collection only
|
||||
//
|
||||
|
||||
export function helloCustomer(): string {
|
||||
return 'Hello from Customers module!';
|
||||
}
|
||||
|
@@ -1,3 +1,12 @@
|
||||
// PURPOSE:
|
||||
// Update customer information
|
||||
// REQ0006
|
||||
//
|
||||
// RULES:
|
||||
// error handled by caller
|
||||
// contain definition to collection only
|
||||
//
|
||||
|
||||
import { pb } from '@/lib/pb';
|
||||
import { COL_CUSTOMERS } from '@/constants';
|
||||
import type { RecordModel } from 'pocketbase';
|
||||
|
Reference in New Issue
Block a user