---
# System prepended metadata

title: Objects & Fields

---

[TOC]

# Objects & Fields

## Estimates

> Columns and relationships of “estimates”

```
export type Estimates = {
  __typename?: 'estimates';
  /** An array relationship */
  bill_details: Array<Bill_Details>;
  /** An aggregate relationship */
  bill_details_aggregate: Bill_Details_Aggregate;
  created_at: Scalars['timestamp'];
  /** An array relationship */
  estimate_details: Array<Estimate_Details>;
  /** An aggregate relationship */
  estimate_details_aggregate: Estimate_Details_Aggregate;
  /** An object relationship */
  group: Groups;
  group_id: Scalars['bigint'];
  id: Scalars['bigint'];
  message?: Maybe<Scalars['String']>;
  name: Scalars['String'];
  /** An object relationship */
  partner: Partners;
  partner_id: Scalars['bigint'];
  pay_limit?: Maybe<Scalars['date']>;
  /** An object relationship */
  tax: Taxes;
  tax_id: Scalars['bigint'];
  total: Scalars['Int'];
  total_with_tax: Scalars['bigint'];
  updated_at: Scalars['timestamp'];
};
```

## Partners

> Columns and relationships of “partners”

```
export type Partners = {
  __typename?: 'partners';
  address1?: Maybe<Scalars['String']>;
  address2?: Maybe<Scalars['String']>;
  address3?: Maybe<Scalars['String']>;
  /** An array relationship */
  bills: Array<Bills>;
  /** An aggregate relationship */
  bills_aggregate: Bills_Aggregate;
  created_at: Scalars['timestamp'];
  /** An array relationship */
  estimates: Array<Estimates>;
  /** An aggregate relationship */
  estimates_aggregate: Estimates_Aggregate;
  group_id: Scalars['bigint'];
  id: Scalars['bigint'];
  name: Scalars['String'];
  /** An object relationship */
  partner: Partners;
  /** An array relationship */
  partners: Array<Partners>;
  /** An aggregate relationship */
  partners_aggregate: Partners_Aggregate;
  post_code?: Maybe<Scalars['String']>;
  tel?: Maybe<Scalars['String']>;
  updated_at: Scalars['timestamp'];
};
```

## Bills

> Columns and relationships of “bills”

```
export type Bills = {
  __typename?: 'bills';
  bill_date: Scalars['date'];
  /** An array relationship */
  bill_details: Array<Bill_Details>;
  /** An aggregate relationship */
  bill_details_aggregate: Bill_Details_Aggregate;
  created_at: Scalars['timestamp'];
  /** An object relationship */
  group: Groups;
  group_id: Scalars['bigint'];
  id: Scalars['bigint'];
  /** An object relationship */
  partner: Partners;
  partner_id: Scalars['bigint'];
  pay_limit: Scalars['date'];
  /** An object relationship */
  tax: Taxes;
  tax_id: Scalars['bigint'];
  total: Scalars['Int'];
  total_with_tax: Scalars['Int'];
  updated_at: Scalars['timestamp'];
};
```

## Groups

> Columns and relationships of “groups”

```
export type Groups = {
  __typename?: 'groups';
  address1?: Maybe<Scalars['String']>;
  address2?: Maybe<Scalars['String']>;
  address3?: Maybe<Scalars['String']>;
  /** An array relationship */
  bills: Array<Bills>;
  /** An aggregate relationship */
  bills_aggregate: Bills_Aggregate;
  created_at: Scalars['timestamp'];
  /** An array relationship */
  estimates: Array<Estimates>;
  /** An aggregate relationship */
  estimates_aggregate: Estimates_Aggregate;
  id: Scalars['bigint'];
  name: Scalars['String'];
  payment_information?: Maybe<Scalars['String']>;
  post_code?: Maybe<Scalars['String']>;
  stamp?: Maybe<Scalars['String']>;
  tel?: Maybe<Scalars['String']>;
  updated_at: Scalars['timestamp'];
};
```

## Taxes

> Columns and relationships of “taxes”

```
export type Taxes = {
  __typename?: 'taxes';
  /** An array relationship */
  bills: Array<Bills>;
  /** An aggregate relationship */
  bills_aggregate: Bills_Aggregate;
  created_at: Scalars['timestamp'];
  /** An array relationship */
  estimates: Array<Estimates>;
  /** An aggregate relationship */
  estimates_aggregate: Estimates_Aggregate;
  id: Scalars['bigint'];
  ratio: Scalars['Int'];
  started_at: Scalars['date'];
  updated_at: Scalars['timestamp'];
};
```

# Relationship

## Estimates

| Array Relationship | Object Relationship |
| ------------------ | ------------------- |
| Groups             |                     |
| Partners           |                     |
| Taxes              |                     |


## Partners

| Array Relationship | Object Relationship |
| ------------------ | ------------------- |
| Bills              | Estimates           |



## Bills

| Array Relationship | Object Relationship |
| ------------------ | ------------------- |
| Groups             | Partner             |
| Taxes              |                     |



## Groups

| Array Relationship | Object Relationship |
| ------------------ | ------------------- |
|                    | Bill                |
|                    | Estimate            |

## Taxes
| Array Relationship | Object Relationship |
| ------------------ | ------------------- |
|                    | Bill                |
|                    | Estimate            |




# Initial File Structure
> Initial file structure for `AAM` Project

```
📦pages
 ┣ 📂api
 ┃ ┗ 📜hello.ts
 ┣ 📂estimates
 ┃ ┣ 📜create.tsx
 ┃ ┗ 📜[id].tsx
 ┣ 📜estimates.tsx
 ┣ 📜index.tsx
 ┗ 📜_app.tsx
📦src
 ┣ 📂components
 ┃ ┣ 📂estimates
 ┃ ┃ ┣ 📂parts
 ┃ ┃ ┃ ┗ 📜EstimateBase.tsx
 ┃ ┃ ┣ 📜EstimateForm.tsx
 ┃ ┃ ┣ 📜EstimateListContainer.tsx
 ┃ ┃ ┗ 📜EstimateSearch.tsx
 ┃ ┣ 📂formFields
 ┃ ┃ ┣ 📜EstimateDetailArray.tsx
 ┃ ┃ ┣ 📜NumberField.tsx
 ┃ ┃ ┗ 📜PartnerSelect.tsx
 ┃ ┗ 📂layout
 ┃ ┃ ┗ 📜MainNav.tsx
 ┣ 📂generated
 ┃ ┗ 📜graphql.tsx
 ┣ 📂hooks
 ┃ ┣ 📜estimateHook.ts
 ┃ ┣ 📜estimatesHook.ts
 ┃ ┣ 📜loadEstimateHook.ts
 ┃ ┗ 📜taxHook.ts
 ┣ 📂queries
 ┃ ┣ 📜client.ts
 ┃ ┣ 📜estimateQueries.ts
 ┃ ┣ 📜partnerQueries.ts
 ┃ ┗ 📜taxQueries.ts
 ┣ 📂utils
 ┃ ┗ 📜KeysMatching.ts
 ┗ 📜const.ts
```
