Kind: Class
Source: Pams/Logic/Pams.Business/Entity/Organization/CompanyBranch.Model.cs (line 10)
Part of: Pams
CompanyBranch represents an organization branch and stores its identity, display names, statement, address reference, branding assets, tax rate, and commercial registration data. It is a business entity model in the PAMS organization domain for passing branch information between application layers.
Diagram
mermaidgraph LR CompanyBranch[CompanyBranch] CompanyBranch --> CompanyBranchID[CompanyBranchID: long] CompanyBranch --> BranchName[BranchName: string] CompanyBranch --> BranchFullName[BranchFullName: string] CompanyBranch --> BranchStatement[BranchStatement: string] CompanyBranch --> AddressID[AddressID: long?] CompanyBranch --> LogoId[LogoId: string] CompanyBranch --> Logo[Logo: string] CompanyBranch --> IsoLogo[IsoLogo: string] CompanyBranch --> VatRate[VatRate: decimal?] CompanyBranch --> CommercialRecord[CommercialRecord: string]
Usage
tstype CompanyBranch = {
CompanyBranchID: bigint;
LogoId: string;
BranchName: string;
BranchFullName: string;
BranchStatement: string;
AddressID: bigint | null;
Logo: string;
IsoLogo: string;
VatRate: string | null;
CommercialRecord: string;
};
async function getCompanyBranch(branchId: string): Promise<CompanyBranch> {
const response = await fetch(`/api/company-branches/${branchId}`);
if (!response.ok) {
throw new Error("Unable to load company branch");
}
return response.json();
}
const branch = await getCompanyBranch(selectedBranchId);
document.title = branch.BranchName;
console.log(branch.BranchFullName, branch.CommercialRecord);
AI Coding Instructions
- Keep property names aligned with the C# model, including
CompanyBranchID,AddressID, andLogoId. - Treat
AddressIDandVatRateas nullable values when mapping API requests and responses. - Preserve
VatRateprecision when transferring it through JavaScript clients; avoid converting it to a floating-point value unless required by the API contract. - Use
Logo,IsoLogo, andLogoIdconsistently with the application's media or asset storage integration. - Validate branch identity and registration fields before persisting changes through organization-related services.
Relationships
- IMPORTS →
CompanyBranch - IMPORTS →
EntityBase - IMPORTS →
Company - IMPORTS →
PamsLinqDataContext
Used by
13 references from 13 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (13)
BaseController—Pams/API/Pams.API/Controllers/BaseController.cs:515CompanyBranchController—Pams/API/Pams.API/Controllers/Organization/CompanyBranchController.cs:21CompanyBranchSettingController—Pams/API/Pams.API/Controllers/Organization/CompanyBranchSettingController.cs:24CompanyController—Pams/API/Pams.API/Controllers/Organization/CompanyController.cs:26EmployeeController—Pams/API/Pams.API/Controllers/Person/EmployeeController.cs:29AccountsController—Pams/API/Pams.API/Controllers/Person/AccountsController.cs:23JobDocumentController—Pams/API/Pams.API/Controllers/Sales/JobDocumentController.cs:19ProjectController—Pams/API/Pams.API/Controllers/Sales/ProjectController.cs:28
…and 5 more.
Was this page helpful?