Model DealService
namespace HubletoApp\Deals\Models\DealService
A list of services attached to a Deal
Constants
This model does not define constants.
Properties
Property | Value |
---|---|
eloquentClass | Eloquent\DealService::class |
table | deal_services |
lookupSqlValue | [TABLE].id_service |
Data Scructure
Column | Title | ADIOS Type | Length | Required |
---|---|---|---|---|
id | ID | int | TRUE | |
unit_price | Unit Price | float | TRUE | |
amount | Amount | int | TRUE | |
discount | Discount (%) | float | FALSE | |
tax | Tax (%) | float | FALSE | |
id_deal | Deal | lookup | TRUE | |
id_service | Service | lookup | TRUE |
Foreign Keys
Column | Model | Relation | OnUpdate | OnDelete |
---|---|---|---|---|
id_deal | Modules\Sales\Deals\Models\Deal | 1:1 | Cascade | Restrict |
id_service | Modules\Core\Services\Models\Service | 1:1 | Cascade | Restrict |
Indexes
Only default indexes are used.
Relations
Relation | Type | Other parameters |
---|---|---|
DEAL | BELONGS_TO | Deal::class, 'id_deal','id' |
SERVICE | BELONGS_TO | Service::class, 'id_service','id' |