Person
PersonBase
Section titled “PersonBase”A person affiliated with an organization or grant application.
Property | Type | Required | Description |
---|---|---|---|
name | Name | Yes | The person’s full name |
title | string | No | The person’s title |
dateOfBirth | isoDate | No | The person’s date of birth |
addresses | AddressCollection | No | The person’s addresses |
phones | PhoneCollection | No | The person’s phone numbers |
emails | EmailCollection | No | The person’s email addresses |
customFields | Record<CustomField> | No | Custom fields for the person |
Formats
Section titled “Formats”A JSON example of this model.
{ "name": { "prefix": "Dr.", "first": "Jane", "middle": "E.", "last": "Doe" }, "title": "Chief Executive Officer", "dateOfBirth": "1990-01-01", "addresses": { "primary": { "street1": "123 Main St", "city": "Anytown", "stateOrProvince": "CA", "country": "US", "postalCode": "12345" }, "otherAddresses": { "work": { "street1": "456 Main St", "street2": "Suite 100", "city": "Anytown", "stateOrProvince": "CA", "country": "US", "postalCode": "12345" } } }, "phones": { "primary": { "countryCode": "+1", "number": "444-456-1230", "isMobile": true }, "otherPhones": { "work": { "countryCode": "+1", "number": "333-456-1230", "isMobile": false } } }, "emails": { "primary": "john.doe@example.com", "otherEmails": { "work": "john.doe@work.com", "personal": "john.doe@gmail.com" } }}
The JSON Schema for this model.
$schema: https://json-schema.org/draft/2020-12/schema$id: PersonBase.yamltype: objectproperties: name: $ref: Name.yaml description: The person's full name, including all relevant components (first, middle, last, etc.). title: type: string description: The person's title, if applicable. addresses: $ref: AddressCollection.yaml description: Collection of physical addresses associated with the person. phones: $ref: PhoneCollection.yaml description: Collection of phone numbers associated with the person. emails: $ref: EmailCollection.yaml description: Collection of email addresses associated with the person. dateOfBirth: $ref: isoDate.yaml description: The person's date of birth. customFields: $ref: "#/$defs/RecordCustomField" description: Custom fields for the person.required: - nameexamples: - name: prefix: Dr. firstName: Jane middleName: Edward lastName: Doe suffix: Jr. title: Chief Executive Officer addresses: primary: street1: 123 Main St city: Anytown stateOrProvince: CA country: US postalCode: "12345" otherAddresses: work: street1: 123 Main St city: Anytown stateOrProvince: CA country: US postalCode: "12345" home: street1: 123 Main St city: Anytown stateOrProvince: CA country: US postalCode: "12345" phones: primary: countryCode: "+1" number: 444-456-1230 isMobile: true otherPhones: home: countryCode: "+1" number: 333-456-1230 isMobile: false emails: primary: john.doe@example.com otherEmails: work: john.doe@work.com personal: john.doe@gmail.com school: john.doe@school.edudescription: A person affiliated with an organization or grant application.$defs: RecordCustomField: type: object properties: {} unevaluatedProperties: $ref: CustomField.yaml
The TypeSpec code for this model.
import "../fields/index.tsp";import "../types.tsp";
namespace CommonGrants.Models;
/** A person affiliated with an organization or grant application. */@example(Examples.Person.examplePerson)model PersonBase { /** The person's full name, including all relevant components (first, middle, last, etc.). */ name: Fields.Name;
/** The person's title, if applicable. */ title?: string;
/** Collection of physical addresses associated with the person. */ addresses?: Fields.AddressCollection;
/** Collection of phone numbers associated with the person. */ phones?: Fields.PhoneCollection;
/** Collection of email addresses associated with the person. */ emails?: Fields.EmailCollection;
/** The person's date of birth. */ dateOfBirth?: Types.isoDate;
/** Custom fields for the person. */ customFields?: Record<Fields.CustomField>;}
// #########################################################