Apps Community apps Deals Model Deal

Model Deal

namespace HubletoApp\Deals\Models\Deal

List of created Deals

Constants

This model does not define constants.

Properties

Property Value
 eloquentClass Eloquent\Deal::class
 table deals
 lookupSqlValue [TABLE].title

Data Scructure

Column Title ADIOS Type Length Required
id ID  int TRUE
title Deal Title  varchar TRUE
price Price  float FALSE
date_expected_close Expected close date  date FALSE
date_created Date Created  date FALSE
note Note  text FALSE
source_channel Source Channel  varchar FALSE
is_archived Archived  boolean TRUE
id_company Company  lookup TRUE
id_person Contact Person  lookup TRUE
id_lead Lead  lookup TRUE
id_currency Currency  lookup TRUE
id_user Assigned User  lookup TRUE
id_pipeline Pipeline  lookup TRUE
id_pipeline_step Pipeline Step  lookup TRUE
id_deal_status Status  lookup FALSE

Foreign Keys

Column Model Relation OnUpdate OnDelete
id_company Modules\Core\Customers\Models\Company 1:1 Cascade Restrict
id_person Modules\Core\Customers\Models\Person 1:1 Cascade Restrict
id_lead Modules\Sales\Leads\Models\Lead 1:1 Cascade Restrict
id_currency Modules\Core\Settins\Models\Currency 1:1 Cascade Restrict
id_user Modules\Core\Settings\Models\User 1:1 Cascade Restrict
id_pipeline Modules\Core\Settings\Models\Pipeline 1:1 Cascade Restrict
id_pipeline_step Modules\Core\Settings\Models\PipelineStep 1:1 Cascade Restrict
id_deal_status Modules\Core\Settings\Models\DealStatus 1:1 Cascade Restrict

Indexes

Only  default indexes are used.

Relations

Relation Type Other parameters
LEAD BELONGS_TO Lead::class, 'id_lead','id'
COMPANY BELONGS_TO Company::class, 'id_company', 'id'
USER BELONGS_TO User::class, 'id_user', 'id'
PERSON HAS_ONE Person::class, 'id', 'id_person'
PIPELINE HAS_ONE Pipeline::class, 'id', 'id_pipeline'
PIPELINE_STEP HAS_ONE PipelineStep::class, 'id', 'id_pipeline_step'
CURRENCY HAS_ONE Currency::class, 'id', 'id_currency'
STATUS HAS_ONE DealStatus::class, 'id', 'id_deal_status'
HISTORY HAS_MANY DealHistory::class, 'id_deal', 'id'
LABELS HAS_MANY DealLabel::class, 'id_deal', 'id'
ACTIVITIES HAS_MANY DealActivity::class, 'id_deal', 'id'
SERVICES HAS_MANY LeadService::class, 'id_deal', 'id'
www.hubleto.com | Found a bug or missing something? Report an issue via GitHub.