Skip to content

Person

reference
1 min readUpdated

Kind: Class

Source: Pams/Logic/Pams.Business/Entity/Person/Person.Model.cs (line 11)

Part of: Pams

Person is a C# entity model for storing identity and naming data for an individual. It links a person to optional company, branch, and person type records through nullable identifier fields.

Diagram

mermaid
graph LR
  Person[Person]
  Person --> PersonID[PersonID: long]
  Person --> RowGuid[RowGuid: Guid?]
  Person --> CompanyID[CompanyID: int?]
  Person --> CompanyBranchID[CompanyBranchID: long?]
  Person --> PersonTypeID[PersonTypeID: int?]
  Person --> Name[Name fields]
  Name --> Title[Title]
  Name --> FirstName[FirstName]
  Name --> MiddleName[MiddleName]
  Name --> LastName[LastName]
  Name --> DisplayName[DisplayName]

Usage

ts
type Person = {
  personID: number;
  rowGuid?: string | null;
  companyID?: number | null;
  companyBranchID?: number | null;
  personTypeID?: number | null;
  title?: string | null;
  firstName?: string | null;
  middleName?: string | null;
  lastName?: string | null;
  displayName?: string | null;
};

const person: Person = {
  personID: 42,
  companyID: 10,
  firstName: "Ada",
  lastName: "Lovelace",
  displayName: "Ada Lovelace"
};

await fetch("/api/person", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify(person)
});

AI Coding Instructions

  • Keep identifier field types aligned with the C# model: PersonID and CompanyBranchID are long, while CompanyID and PersonTypeID are int.
  • Treat RowGuid, company fields, branch fields, and person type fields as nullable when mapping API payloads.
  • Preserve the separate name fields instead of deriving FirstName, MiddleName, or LastName from DisplayName.
  • Confirm JSON property casing with the API serializer before sending TypeScript request payloads.

Relationships

  • IMPORTS → PostedFile
  • IMPORTS → PersonUser
  • IMPORTS → PersonUserBindingModel
  • IMPORTS → Company
  • IMPORTS → CompanyBranchLightBindingModel
  • IMPORTS → LookUpCommonBindingModel
  • IMPORTS → UserPremissionsModel
  • IMPORTS → LogProperties
  • IMPORTS → PersonUserDataBindingModel
  • IMPORTS → ClientAllowedFeaturesBindingModel
  • IMPORTS → Person
  • IMPORTS → EntityBase
  • IMPORTS → PamsLinqDataContext

Used by

76 references from 76 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

Imported by (76)

  • BaseControllerPams/API/Pams.API/Controllers/BaseController.cs:515
  • EmployeeBonusControllerPams/API/Pams.API/Controllers/BookingTarget/EmployeeBonusController.cs:11
  • CurrencyControllerPams/API/Pams.API/Controllers/Common/CurrencyController.cs:20
  • FilesControllerPams/API/Pams.API/Controllers/Common/FilesController.cs:27
  • CompanyBranchControllerPams/API/Pams.API/Controllers/Organization/CompanyBranchController.cs:21
  • CompanyControllerPams/API/Pams.API/Controllers/Organization/CompanyController.cs:26
  • EmployeeControllerPams/API/Pams.API/Controllers/Person/EmployeeController.cs:29
  • AccountsControllerPams/API/Pams.API/Controllers/Person/AccountsController.cs:23

…and 68 more.

Was this page helpful?

Download as PDF