| GET,POST,PUT,DELETE,OPTIONS | /v1/Project/Materials/{ProjectID} | ||
|---|---|---|---|
| GET,POST,PUT,DELETE,OPTIONS | /v1/Project/Materials/{ProjectID}/{JobID} |
<?php namespace dtos;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
class Project implements JsonSerializable
{
public function __construct(
/** @var int */
public int $ProjectID=0,
/** @var string */
public string $ProjectUID='',
/** @var string|null */
public ?string $ProjectName=null,
/** @var string|null */
public ?string $ImageURL=null,
/** @var string|null */
public ?string $ImageKey=null,
/** @var string|null */
public ?string $ClientName=null,
/** @var string|null */
public ?string $ClientPhone=null,
/** @var string|null */
public ?string $ClientEmail=null,
/** @var int */
public int $ProjectManagerID=0,
/** @var string|null */
public ?string $ProjectManagerName=null,
/** @var DateTime|null */
public ?DateTime $StartDate=null,
/** @var DateTime|null */
public ?DateTime $EndDate=null,
/** @var DateTime|null */
public ?DateTime $ActualStartDate=null,
/** @var DateTime|null */
public ?DateTime $ActualEndDate=null,
/** @var int */
public int $JobCount=0,
/** @var int */
public int $CrewMemberCount=0,
/** @var int */
public int $EquipmentCount=0,
/** @var int */
public int $MaterialCount=0,
/** @var int */
public int $ProjectStatusID=0,
/** @var string|null */
public ?string $ProjectStatusDescription=null,
/** @var float */
public float $Budget=0.0,
/** @var float */
public float $CostToDate=0.0,
/** @var string|null */
public ?string $ProjectLocation=null,
/** @var string|null */
public ?string $ProjectType=null,
/** @var string|null */
public ?string $ProjectSponsor=null,
/** @var string|null */
public ?string $CreatedBy=null,
/** @var DateTime|null */
public ?DateTime $CreatedAt=null,
/** @var DateTime|null */
public ?DateTime $UpdatedAt=null,
/** @var string|null */
public ?string $ProjectDescription=null,
/** @var string|null */
public ?string $Scope=null,
/** @var int */
public int $StatusId=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ProjectID'])) $this->ProjectID = $o['ProjectID'];
if (isset($o['ProjectUID'])) $this->ProjectUID = $o['ProjectUID'];
if (isset($o['ProjectName'])) $this->ProjectName = $o['ProjectName'];
if (isset($o['ImageURL'])) $this->ImageURL = $o['ImageURL'];
if (isset($o['ImageKey'])) $this->ImageKey = $o['ImageKey'];
if (isset($o['ClientName'])) $this->ClientName = $o['ClientName'];
if (isset($o['ClientPhone'])) $this->ClientPhone = $o['ClientPhone'];
if (isset($o['ClientEmail'])) $this->ClientEmail = $o['ClientEmail'];
if (isset($o['ProjectManagerID'])) $this->ProjectManagerID = $o['ProjectManagerID'];
if (isset($o['ProjectManagerName'])) $this->ProjectManagerName = $o['ProjectManagerName'];
if (isset($o['StartDate'])) $this->StartDate = JsonConverters::from('DateTime', $o['StartDate']);
if (isset($o['EndDate'])) $this->EndDate = JsonConverters::from('DateTime', $o['EndDate']);
if (isset($o['ActualStartDate'])) $this->ActualStartDate = JsonConverters::from('DateTime', $o['ActualStartDate']);
if (isset($o['ActualEndDate'])) $this->ActualEndDate = JsonConverters::from('DateTime', $o['ActualEndDate']);
if (isset($o['JobCount'])) $this->JobCount = $o['JobCount'];
if (isset($o['CrewMemberCount'])) $this->CrewMemberCount = $o['CrewMemberCount'];
if (isset($o['EquipmentCount'])) $this->EquipmentCount = $o['EquipmentCount'];
if (isset($o['MaterialCount'])) $this->MaterialCount = $o['MaterialCount'];
if (isset($o['ProjectStatusID'])) $this->ProjectStatusID = $o['ProjectStatusID'];
if (isset($o['ProjectStatusDescription'])) $this->ProjectStatusDescription = $o['ProjectStatusDescription'];
if (isset($o['Budget'])) $this->Budget = $o['Budget'];
if (isset($o['CostToDate'])) $this->CostToDate = $o['CostToDate'];
if (isset($o['ProjectLocation'])) $this->ProjectLocation = $o['ProjectLocation'];
if (isset($o['ProjectType'])) $this->ProjectType = $o['ProjectType'];
if (isset($o['ProjectSponsor'])) $this->ProjectSponsor = $o['ProjectSponsor'];
if (isset($o['CreatedBy'])) $this->CreatedBy = $o['CreatedBy'];
if (isset($o['CreatedAt'])) $this->CreatedAt = JsonConverters::from('DateTime', $o['CreatedAt']);
if (isset($o['UpdatedAt'])) $this->UpdatedAt = JsonConverters::from('DateTime', $o['UpdatedAt']);
if (isset($o['ProjectDescription'])) $this->ProjectDescription = $o['ProjectDescription'];
if (isset($o['Scope'])) $this->Scope = $o['Scope'];
if (isset($o['StatusId'])) $this->StatusId = $o['StatusId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ProjectID)) $o['ProjectID'] = $this->ProjectID;
if (isset($this->ProjectUID)) $o['ProjectUID'] = $this->ProjectUID;
if (isset($this->ProjectName)) $o['ProjectName'] = $this->ProjectName;
if (isset($this->ImageURL)) $o['ImageURL'] = $this->ImageURL;
if (isset($this->ImageKey)) $o['ImageKey'] = $this->ImageKey;
if (isset($this->ClientName)) $o['ClientName'] = $this->ClientName;
if (isset($this->ClientPhone)) $o['ClientPhone'] = $this->ClientPhone;
if (isset($this->ClientEmail)) $o['ClientEmail'] = $this->ClientEmail;
if (isset($this->ProjectManagerID)) $o['ProjectManagerID'] = $this->ProjectManagerID;
if (isset($this->ProjectManagerName)) $o['ProjectManagerName'] = $this->ProjectManagerName;
if (isset($this->StartDate)) $o['StartDate'] = JsonConverters::to('DateTime', $this->StartDate);
if (isset($this->EndDate)) $o['EndDate'] = JsonConverters::to('DateTime', $this->EndDate);
if (isset($this->ActualStartDate)) $o['ActualStartDate'] = JsonConverters::to('DateTime', $this->ActualStartDate);
if (isset($this->ActualEndDate)) $o['ActualEndDate'] = JsonConverters::to('DateTime', $this->ActualEndDate);
if (isset($this->JobCount)) $o['JobCount'] = $this->JobCount;
if (isset($this->CrewMemberCount)) $o['CrewMemberCount'] = $this->CrewMemberCount;
if (isset($this->EquipmentCount)) $o['EquipmentCount'] = $this->EquipmentCount;
if (isset($this->MaterialCount)) $o['MaterialCount'] = $this->MaterialCount;
if (isset($this->ProjectStatusID)) $o['ProjectStatusID'] = $this->ProjectStatusID;
if (isset($this->ProjectStatusDescription)) $o['ProjectStatusDescription'] = $this->ProjectStatusDescription;
if (isset($this->Budget)) $o['Budget'] = $this->Budget;
if (isset($this->CostToDate)) $o['CostToDate'] = $this->CostToDate;
if (isset($this->ProjectLocation)) $o['ProjectLocation'] = $this->ProjectLocation;
if (isset($this->ProjectType)) $o['ProjectType'] = $this->ProjectType;
if (isset($this->ProjectSponsor)) $o['ProjectSponsor'] = $this->ProjectSponsor;
if (isset($this->CreatedBy)) $o['CreatedBy'] = $this->CreatedBy;
if (isset($this->CreatedAt)) $o['CreatedAt'] = JsonConverters::to('DateTime', $this->CreatedAt);
if (isset($this->UpdatedAt)) $o['UpdatedAt'] = JsonConverters::to('DateTime', $this->UpdatedAt);
if (isset($this->ProjectDescription)) $o['ProjectDescription'] = $this->ProjectDescription;
if (isset($this->Scope)) $o['Scope'] = $this->Scope;
if (isset($this->StatusId)) $o['StatusId'] = $this->StatusId;
return empty($o) ? new class(){} : $o;
}
}
class Material implements JsonSerializable
{
public function __construct(
/** @var int */
public int $MaterialID=0,
/** @var string|null */
public ?string $MaterialName=null,
/** @var int */
public int $MaterialTypeID=0,
/** @var int */
public int $MaterialStatusID=0,
/** @var int */
public int $Quantity=0,
/** @var string|null */
public ?string $Supplier=null,
/** @var DateTime */
public DateTime $OrderDate=new DateTime(),
/** @var DateTime */
public DateTime $DeliveryDate=new DateTime(),
/** @var DateTime */
public DateTime $OnSiteDate=new DateTime(),
/** @var string|null */
public ?string $MaterialLocation=null,
/** @var string|null */
public ?string $Manufacturer=null,
/** @var string|null */
public ?string $SerialNumber=null,
/** @var string|null */
public ?string $BarCode=null,
/** @var string|null */
public ?string $TrackingInfo=null,
/** @var string|null */
public ?string $MaterialDescription=null,
/** @var string|null */
public ?string $Notes=null,
/** @var string|null */
public ?string $ImageURL=null,
/** @var string|null */
public ?string $DetailsURL=null,
/** @var string */
public string $CreatedByUID='',
/** @var bool|null */
public ?bool $Active=null,
/** @var DateTime */
public DateTime $RecordCreatedDate=new DateTime(),
/** @var int */
public int $StatusId=0,
/** @var string|null */
public ?string $MaterialTypeName=null,
/** @var float */
public float $Cost=0.0,
/** @var array<Project>|null */
public ?array $Projects=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['MaterialID'])) $this->MaterialID = $o['MaterialID'];
if (isset($o['MaterialName'])) $this->MaterialName = $o['MaterialName'];
if (isset($o['MaterialTypeID'])) $this->MaterialTypeID = $o['MaterialTypeID'];
if (isset($o['MaterialStatusID'])) $this->MaterialStatusID = $o['MaterialStatusID'];
if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
if (isset($o['Supplier'])) $this->Supplier = $o['Supplier'];
if (isset($o['OrderDate'])) $this->OrderDate = JsonConverters::from('DateTime', $o['OrderDate']);
if (isset($o['DeliveryDate'])) $this->DeliveryDate = JsonConverters::from('DateTime', $o['DeliveryDate']);
if (isset($o['OnSiteDate'])) $this->OnSiteDate = JsonConverters::from('DateTime', $o['OnSiteDate']);
if (isset($o['MaterialLocation'])) $this->MaterialLocation = $o['MaterialLocation'];
if (isset($o['Manufacturer'])) $this->Manufacturer = $o['Manufacturer'];
if (isset($o['SerialNumber'])) $this->SerialNumber = $o['SerialNumber'];
if (isset($o['BarCode'])) $this->BarCode = $o['BarCode'];
if (isset($o['TrackingInfo'])) $this->TrackingInfo = $o['TrackingInfo'];
if (isset($o['MaterialDescription'])) $this->MaterialDescription = $o['MaterialDescription'];
if (isset($o['Notes'])) $this->Notes = $o['Notes'];
if (isset($o['ImageURL'])) $this->ImageURL = $o['ImageURL'];
if (isset($o['DetailsURL'])) $this->DetailsURL = $o['DetailsURL'];
if (isset($o['CreatedByUID'])) $this->CreatedByUID = $o['CreatedByUID'];
if (isset($o['Active'])) $this->Active = $o['Active'];
if (isset($o['RecordCreatedDate'])) $this->RecordCreatedDate = JsonConverters::from('DateTime', $o['RecordCreatedDate']);
if (isset($o['StatusId'])) $this->StatusId = $o['StatusId'];
if (isset($o['MaterialTypeName'])) $this->MaterialTypeName = $o['MaterialTypeName'];
if (isset($o['Cost'])) $this->Cost = $o['Cost'];
if (isset($o['Projects'])) $this->Projects = JsonConverters::fromArray('Project', $o['Projects']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->MaterialID)) $o['MaterialID'] = $this->MaterialID;
if (isset($this->MaterialName)) $o['MaterialName'] = $this->MaterialName;
if (isset($this->MaterialTypeID)) $o['MaterialTypeID'] = $this->MaterialTypeID;
if (isset($this->MaterialStatusID)) $o['MaterialStatusID'] = $this->MaterialStatusID;
if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
if (isset($this->Supplier)) $o['Supplier'] = $this->Supplier;
if (isset($this->OrderDate)) $o['OrderDate'] = JsonConverters::to('DateTime', $this->OrderDate);
if (isset($this->DeliveryDate)) $o['DeliveryDate'] = JsonConverters::to('DateTime', $this->DeliveryDate);
if (isset($this->OnSiteDate)) $o['OnSiteDate'] = JsonConverters::to('DateTime', $this->OnSiteDate);
if (isset($this->MaterialLocation)) $o['MaterialLocation'] = $this->MaterialLocation;
if (isset($this->Manufacturer)) $o['Manufacturer'] = $this->Manufacturer;
if (isset($this->SerialNumber)) $o['SerialNumber'] = $this->SerialNumber;
if (isset($this->BarCode)) $o['BarCode'] = $this->BarCode;
if (isset($this->TrackingInfo)) $o['TrackingInfo'] = $this->TrackingInfo;
if (isset($this->MaterialDescription)) $o['MaterialDescription'] = $this->MaterialDescription;
if (isset($this->Notes)) $o['Notes'] = $this->Notes;
if (isset($this->ImageURL)) $o['ImageURL'] = $this->ImageURL;
if (isset($this->DetailsURL)) $o['DetailsURL'] = $this->DetailsURL;
if (isset($this->CreatedByUID)) $o['CreatedByUID'] = $this->CreatedByUID;
if (isset($this->Active)) $o['Active'] = $this->Active;
if (isset($this->RecordCreatedDate)) $o['RecordCreatedDate'] = JsonConverters::to('DateTime', $this->RecordCreatedDate);
if (isset($this->StatusId)) $o['StatusId'] = $this->StatusId;
if (isset($this->MaterialTypeName)) $o['MaterialTypeName'] = $this->MaterialTypeName;
if (isset($this->Cost)) $o['Cost'] = $this->Cost;
if (isset($this->Projects)) $o['Projects'] = JsonConverters::toArray('Project', $this->Projects);
return empty($o) ? new class(){} : $o;
}
}
class ProjectMaterial extends Material implements JsonSerializable
{
/**
* @param int $MaterialID
* @param string|null $MaterialName
* @param int $MaterialTypeID
* @param int $MaterialStatusID
* @param int $Quantity
* @param string|null $Supplier
* @param DateTime $OrderDate
* @param DateTime $DeliveryDate
* @param DateTime $OnSiteDate
* @param string|null $MaterialLocation
* @param string|null $Manufacturer
* @param string|null $SerialNumber
* @param string|null $BarCode
* @param string|null $TrackingInfo
* @param string|null $MaterialDescription
* @param string|null $Notes
* @param string|null $ImageURL
* @param string|null $DetailsURL
* @param string $CreatedByUID
* @param bool|null $Active
* @param DateTime $RecordCreatedDate
* @param int $StatusId
* @param string|null $MaterialTypeName
* @param float $Cost
* @param array<Project>|null $Projects
*/
public function __construct(
int $MaterialID=0,
?string $MaterialName=null,
int $MaterialTypeID=0,
int $MaterialStatusID=0,
int $Quantity=0,
?string $Supplier=null,
DateTime $OrderDate=new DateTime(),
DateTime $DeliveryDate=new DateTime(),
DateTime $OnSiteDate=new DateTime(),
?string $MaterialLocation=null,
?string $Manufacturer=null,
?string $SerialNumber=null,
?string $BarCode=null,
?string $TrackingInfo=null,
?string $MaterialDescription=null,
?string $Notes=null,
?string $ImageURL=null,
?string $DetailsURL=null,
string $CreatedByUID='',
?bool $Active=null,
DateTime $RecordCreatedDate=new DateTime(),
int $StatusId=0,
?string $MaterialTypeName=null,
float $Cost=0.0,
?array $Projects=null,
/** @var int */
public int $ProjectMaterialID=0,
/** @var int */
public int $ProjectID=0,
/** @var DateTime */
public DateTime $ProjectEndDate=new DateTime(),
/** @var float */
public float $MaterialCost=0.0,
/** @var int */
public int $JobID=0,
/** @var float */
public float $BilledMaterialCost=0.0,
/** @var int */
public int $MaterialQty=0
) {
parent::__construct($MaterialID,$MaterialName,$MaterialTypeID,$MaterialStatusID,$Quantity,$Supplier,$OrderDate,$DeliveryDate,$OnSiteDate,$MaterialLocation,$Manufacturer,$SerialNumber,$BarCode,$TrackingInfo,$MaterialDescription,$Notes,$ImageURL,$DetailsURL,$CreatedByUID,$Active,$RecordCreatedDate,$StatusId,$MaterialTypeName,$Cost,$Projects);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['ProjectMaterialID'])) $this->ProjectMaterialID = $o['ProjectMaterialID'];
if (isset($o['ProjectID'])) $this->ProjectID = $o['ProjectID'];
if (isset($o['ProjectEndDate'])) $this->ProjectEndDate = JsonConverters::from('DateTime', $o['ProjectEndDate']);
if (isset($o['MaterialCost'])) $this->MaterialCost = $o['MaterialCost'];
if (isset($o['JobID'])) $this->JobID = $o['JobID'];
if (isset($o['BilledMaterialCost'])) $this->BilledMaterialCost = $o['BilledMaterialCost'];
if (isset($o['MaterialQty'])) $this->MaterialQty = $o['MaterialQty'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->ProjectMaterialID)) $o['ProjectMaterialID'] = $this->ProjectMaterialID;
if (isset($this->ProjectID)) $o['ProjectID'] = $this->ProjectID;
if (isset($this->ProjectEndDate)) $o['ProjectEndDate'] = JsonConverters::to('DateTime', $this->ProjectEndDate);
if (isset($this->MaterialCost)) $o['MaterialCost'] = $this->MaterialCost;
if (isset($this->JobID)) $o['JobID'] = $this->JobID;
if (isset($this->BilledMaterialCost)) $o['BilledMaterialCost'] = $this->BilledMaterialCost;
if (isset($this->MaterialQty)) $o['MaterialQty'] = $this->MaterialQty;
return empty($o) ? new class(){} : $o;
}
}
class ProjectMaterialListResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var array<ProjectMaterial>|null */
public ?array $ProjectMaterials=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['ProjectMaterials'])) $this->ProjectMaterials = JsonConverters::fromArray('ProjectMaterial', $o['ProjectMaterials']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->ProjectMaterials)) $o['ProjectMaterials'] = JsonConverters::toArray('ProjectMaterial', $this->ProjectMaterials);
return empty($o) ? new class(){} : $o;
}
}
class ProjectMaterialListRequest implements JsonSerializable
{
public function __construct(
/** @var int */
public int $ProjectID=0,
/** @var int */
public int $JobID=0,
/** @var array<Material>|null */
public ?array $ProjectMaterials=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ProjectID'])) $this->ProjectID = $o['ProjectID'];
if (isset($o['JobID'])) $this->JobID = $o['JobID'];
if (isset($o['ProjectMaterials'])) $this->ProjectMaterials = JsonConverters::fromArray('Material', $o['ProjectMaterials']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ProjectID)) $o['ProjectID'] = $this->ProjectID;
if (isset($this->JobID)) $o['JobID'] = $this->JobID;
if (isset($this->ProjectMaterials)) $o['ProjectMaterials'] = JsonConverters::toArray('Material', $this->ProjectMaterials);
return empty($o) ? new class(){} : $o;
}
}
PHP ProjectMaterialListRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Project/Materials/{ProjectID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"ProjectID":0,"JobID":0,"ProjectMaterials":[{"MaterialID":0,"MaterialName":"String","MaterialTypeID":0,"MaterialStatusID":0,"Quantity":0,"Supplier":"String","OrderDate":"0001-01-01T00:00:00.0000000","DeliveryDate":"0001-01-01T00:00:00.0000000","OnSiteDate":"0001-01-01T00:00:00.0000000","MaterialLocation":"String","Manufacturer":"String","SerialNumber":"String","BarCode":"String","TrackingInfo":"String","MaterialDescription":"String","Notes":"String","ImageURL":"String","DetailsURL":"String","CreatedByUID":"00000000000000000000000000000000","Active":false,"RecordCreatedDate":"0001-01-01T00:00:00.0000000","StatusId":0,"MaterialTypeName":"String","Cost":0,"Projects":[{"ProjectID":0,"ProjectUID":"00000000000000000000000000000000","ProjectName":"String","ImageURL":"String","ImageKey":"String","ClientName":"String","ClientPhone":"String","ClientEmail":"String","ProjectManagerID":0,"ProjectManagerName":"String","StartDate":"0001-01-01T00:00:00.0000000","EndDate":"0001-01-01T00:00:00.0000000","ActualStartDate":"0001-01-01T00:00:00.0000000","ActualEndDate":"0001-01-01T00:00:00.0000000","JobCount":0,"CrewMemberCount":0,"EquipmentCount":0,"MaterialCount":0,"ProjectStatusID":0,"ProjectStatusDescription":"String","Budget":0,"CostToDate":0,"ProjectLocation":"String","ProjectType":"String","ProjectSponsor":"String","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","ProjectDescription":"String","Scope":"String","StatusId":0}]}]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"ProjectMaterials":[{"ProjectMaterialID":0,"ProjectID":0,"ProjectEndDate":"0001-01-01T00:00:00.0000000","MaterialCost":0,"JobID":0,"BilledMaterialCost":0,"MaterialQty":0,"MaterialID":0,"MaterialName":"String","MaterialTypeID":0,"MaterialStatusID":0,"Quantity":0,"Supplier":"String","OrderDate":"0001-01-01T00:00:00.0000000","DeliveryDate":"0001-01-01T00:00:00.0000000","OnSiteDate":"0001-01-01T00:00:00.0000000","MaterialLocation":"String","Manufacturer":"String","SerialNumber":"String","BarCode":"String","TrackingInfo":"String","MaterialDescription":"String","Notes":"String","ImageURL":"String","DetailsURL":"String","CreatedByUID":"00000000000000000000000000000000","Active":false,"RecordCreatedDate":"0001-01-01T00:00:00.0000000","StatusId":0,"MaterialTypeName":"String","Cost":0,"Projects":[{"ProjectID":0,"ProjectUID":"00000000000000000000000000000000","ProjectName":"String","ImageURL":"String","ImageKey":"String","ClientName":"String","ClientPhone":"String","ClientEmail":"String","ProjectManagerID":0,"ProjectManagerName":"String","StartDate":"0001-01-01T00:00:00.0000000","EndDate":"0001-01-01T00:00:00.0000000","ActualStartDate":"0001-01-01T00:00:00.0000000","ActualEndDate":"0001-01-01T00:00:00.0000000","JobCount":0,"CrewMemberCount":0,"EquipmentCount":0,"MaterialCount":0,"ProjectStatusID":0,"ProjectStatusDescription":"String","Budget":0,"CostToDate":0,"ProjectLocation":"String","ProjectType":"String","ProjectSponsor":"String","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","ProjectDescription":"String","Scope":"String","StatusId":0}]}]}