# Miscellaneous Collections Data Model

eChallan or the mCollect system enables employees to generate the challans for Adhoc services so that the payment can be recorded into the system along with service-specific details.

## mCollect Service Entity Details

* [echallan\_id](#echallan_id)
* [echallan\_address](#echallan_address)

## Data Constructs

### echallan\_id

{% tabs %}
{% tab title="Description" %}
This table store the challan details created by an employee for the ad-hoc services.
{% endtab %}

{% tab title="Attributes" %}

| Attribute Name                                     | Data Type | Definition                                                                          | Mandatory (Y/N) |
| -------------------------------------------------- | --------- | ----------------------------------------------------------------------------------- | --------------- |
| <mark style="background-color:red;">id (PK)</mark> | varchar   | The system generated unique id(UUID)                                                | Y               |
| accountid                                          | varchar   | UUID of the user(citizen) requesting the service                                    | Y               |
| tenantid                                           | varchar   | Unique identifier for a tenant to which user primarily belongs                      | Y               |
| challanNo                                          | varchar   | Unique ref Number for the Challan created                                           | Y               |
| businessService                                    | varchar   | The category for which the Challan is created                                       | Y               |
| referenceid                                        | varchar   | Unique identifier of the entity for which the challan is generated                  | N               |
| applicationStatus                                  | varchar   | Challan status - Active, Expired and Cancelled                                      | Y               |
| additionalDetail                                   | jsonb     | Json object to capture any extra information which is not accommodated in the model | N               |
| taxperiodFrom                                      | int       | Date range used for demand generation for the challan                               | Y               |
| taxperiodTo                                        | int       | Date range used for demand generation for the challan                               | Y               |
| createdby                                          | varchar   | username (preferred) or userid of the user that created the object                  | Y               |
| lastmodifiedby                                     | varchar   | username (preferred) or userid of the user that last modified the object            | Y               |
| createdtime                                        | int       | epoch of the time object is created                                                 | Y               |
| lastmodifiedtime                                   | int       | epoch of the time object is modified last                                           | Y               |
| filestoreid                                        | varchar   | Filestore id of challan pdf                                                         | N               |
| description                                        | varchar   | Additional information or description of the challan                                | N               |
| {% endtab %}                                       |           |                                                                                     |                 |

{% tab title="Mapping" %}

| Attribute Name    | Mapping Details                         |
| ----------------- | --------------------------------------- |
| id (primary key)  | $.Challan.id                            |
| accountid         | $.Challan.citizen.uuid                  |
| tenantid          | $.Challan.tenantId                      |
| challanNo         | $.Challan.challanNo                     |
| businessService   | $.Challan.businessService               |
| referenceid       | $.Challan.referenceId                   |
| applicationStatus | $.Challan.applicationStatus             |
| additionalDetail  | $.Challan.additionalDetail              |
| taxperiodFrom     | $.Challan.taxPeriodFrom                 |
| taxperiodTo       | $.Challan.taxPeriodTo                   |
| createdby         | $.Challan.auditDetails.createdBy        |
| lastmodifiedby    | $.Challan.auditDetails.lastModifiedBy   |
| createdtime       | $.Challan.auditDetails.createdTime      |
| lastmodifiedtime  | $.Challan.auditDetails.lastModifiedTime |
| filestoreid       | $.Challan.filestoreid                   |
| description       | $.Challan.description                   |
| {% endtab %}      |                                         |
| {% endtabs %}     |                                         |

### echallan\_address

{% tabs %}
{% tab title="Description" %}
This table stores the address details of the citizen (applicant) to whom challan is issued.
{% endtab %}

{% tab title="Attributes" %}

<table><thead><tr><th>Attribute Name</th><th width="172">Data Type</th><th width="238">Definition</th><th>Mandatory (Y/N)</th></tr></thead><tbody><tr><td><mark style="background-color:red;">id (PK)</mark></td><td>varchar</td><td>The system generated unique id(UUID)</td><td>Y</td></tr><tr><td>tenantid</td><td>varchar</td><td>Unique Identifier of the tenant to which user primarily belongs</td><td>Y</td></tr><tr><td>doorno</td><td>varchar</td><td>House number or door number of the building of user</td><td>N</td></tr><tr><td>plotno</td><td>varchar</td><td>Plot number of the house</td><td>N</td></tr><tr><td>latitude</td><td>FLOAT</td><td>The latitude location details of the user address</td><td>N</td></tr><tr><td>longitude</td><td>FLOAT</td><td>The longitude location details of the user address</td><td>N</td></tr><tr><td>buildingName</td><td>varchar</td><td>Name of the building</td><td>N</td></tr><tr><td>landmark</td><td>varchar</td><td>Additional location detail to help find the address of user</td><td>N</td></tr><tr><td>street</td><td>varchar</td><td>Street name</td><td>N</td></tr><tr><td>city</td><td>varchar</td><td>City of the address. It can be representated by the tenantid</td><td>N</td></tr><tr><td>district</td><td>varchar</td><td>The district of the address</td><td>N</td></tr><tr><td>region</td><td>varchar</td><td>The region where user resides</td><td>N</td></tr><tr><td>state</td><td>varchar</td><td>The State where user resides</td><td>N</td></tr><tr><td>country</td><td>varchar</td><td>Country of user</td><td>N</td></tr><tr><td>locality</td><td>varchar</td><td>Locality of user</td><td>Y</td></tr><tr><td>pincode</td><td>varchar</td><td>PIN code of the address. Indian pincodes will usually be all numbers.</td><td>N</td></tr><tr><td>detail</td><td>varchar</td><td>more address detail as may be needed</td><td>N</td></tr><tr><td><mark style="background-color:green;">echallanid (FK)</mark></td><td>varchar</td><td>Unique identifier of the challan</td><td>Y</td></tr><tr><td>createdby</td><td>varchar</td><td>username (preferred) or userid of the user that created the object</td><td>Y</td></tr><tr><td>lastmodifiedby</td><td>varchar</td><td>username (preferred) or userid of the user that last modified the object</td><td>Y</td></tr><tr><td>createdtime</td><td>int</td><td>epoch of the time object is created</td><td>Y</td></tr><tr><td>lastmodifiedtime</td><td>int</td><td>epoch of the time object is modified last</td><td>Y</td></tr></tbody></table>
{% endtab %}

{% tab title="Mapping" %}

<table><thead><tr><th width="304">Attribute Name</th><th>Mapping Details</th></tr></thead><tbody><tr><td>id (primary key)</td><td>$.Challan.address.id</td></tr><tr><td>tenantid</td><td>$.Challan.address.tenantId</td></tr><tr><td>doorno</td><td>$.Challan.address.doorNo</td></tr><tr><td>plotno</td><td>$.Challan.address.plotNo</td></tr><tr><td>latitude</td><td>$.Challan.address.latitude</td></tr><tr><td>longitude</td><td>$.Challan.address.longitude</td></tr><tr><td>buildingName</td><td>$.Challan.address.buildingName</td></tr><tr><td>landmark</td><td>$.Challan.address.landmark</td></tr><tr><td>street</td><td>$.Challan.address.street</td></tr><tr><td>city</td><td>$.Challan.address.city</td></tr><tr><td>district</td><td>$.Challan.address.district</td></tr><tr><td>region</td><td>$.Challan.address.region</td></tr><tr><td>state</td><td>$.Challan.address.state</td></tr><tr><td>country</td><td>$.Challan.address.country</td></tr><tr><td>locality</td><td>$.Challan.address.locality.code</td></tr><tr><td>pincode</td><td>$.Challan.address.pincode</td></tr><tr><td>detail</td><td>$.Challan.address.detail</td></tr><tr><td>echallanid (foreign key)</td><td>$.Challan.id</td></tr><tr><td>createdby</td><td>$.Challan.auditDetails.createdBy</td></tr><tr><td>lastmodifiedby</td><td>$.Challan.auditDetails.lastModifiedBy</td></tr><tr><td>createdtime</td><td>$.Challan.auditDetails.createdTime<br></td></tr><tr><td>lastmodifiedtime</td><td>$.Challan.auditDetails.lastModifiedTime</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

## Mapping Constructs

![](https://1565300493-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MfpBlzkkh_ETBG9lS99%2Fuploads%2FHFLnhuUXfKmFgEAix7Kg%2FeChallan.png?alt=media\&token=16c70e2f-2bf0-4283-b9bd-9ddf35cf35d0)

[![Creative Commons License](https://i.creativecommons.org/l/by/4.0/80x15.png)](http://creativecommons.org/licenses/by/4.0/)All content on this page by [eGov Foundation ](https://egov.org.in/)is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).
