Apps Community apps Leads Model Lead

Model Lead

namespace HubletoApp\Leads\Models\Lead

List of created Leads

Constants

This model does not define constants.

Properties

Property Value
 eloquentClass Eloquent\Lead::class
 table leads
 lookupSqlValue [TABLE].title

Data Scructure

Column Title ADIOS Type Length Required
id ID  int TRUE
title Lead 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 FALSE
id_person Contact Person  lookup FALSE
id_currency Currency  lookup TRUE
id_user Assigned User  lookup TRUE
id_status Status  lookup TRUE

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_currency Modules\Core\Settins\Models\Currency 1:1 Cascade Restrict
id_user Modules\Core\Settings\Models\User 1:1 Cascade Restrict
id_status Modules\Core\Settings\Models\LeadStatus 1:1 Restrict Restrict

Indexes

Only  default indexes are used.

Relations

Relation Type Other parameters
DEAL BELONGS_TO Deal::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'
CURRENCY HAS_ONE Currency::class, 'id', 'id_currency'
STATUS HAS_ONE LeadStatus::class, 'id', 'id_status'
HISTORY HAS_MANY DealHistory::class, 'id_lead', 'id'
LABELS HAS_MANY DealLabel::class, 'id_lead', 'id'
ACTIVITIES HAS_MANY LeadActivity::class, 'id_lead', 'id'
SERVICES HAS_MANY LeadService::class, 'id_lead', 'id'
www.hubleto.com | Found a bug or missing something? Report an issue via GitHub.