Model Activity
namespace Hubleto\App\Customers\Models\Activity
List of activities. Some activies are connected to a model.
Constants
This model does not define constants.
Properties
| Property | Value |
|---|---|
| eloquentClass | Eloquent\Activity::class |
| table | activities |
| lookupSqlValue | [TABLE].subject |
Data Scructure
| Column | Title | ADIOS Type | Length | Required |
|---|---|---|---|---|
| id | ID | int | TRUE | |
| subject | Activity subject | varchar | TRUE | |
| date_start | Start Date | date | FALSE | |
| time_start | Start Time | time | FALSE | |
| date_end | End Date | date | FALSE | |
| time_end | End Time | time | FALSE | |
| all_day | All day | boolean | FALSE | |
| completed | Completed | boolean | FALSE | |
| id_activity_type | Activity type | lookup | TRUE | |
| id_user | Created by | lookup | TRUE |
Foreign Keys
| Column | Model | Relation | OnUpdate | OnDelete |
|---|---|---|---|---|
| id_activity_type | Modules\Core\Settings\Models\ActivityType | 1:1 | Cascade | Restrict |
| id_user | Modules\Core\Settings\Models\User | 1:1 | Cascade | Restrict |
Indexes
Only default indexes are used.
Relations
| Relation | Type | Other parameters |
|---|---|---|
| COMPANY_ACTIVITY | HAS_ONE | CompanyActivity::class, 'id_activity', 'id' |
| LEAD_ACTIVITY | HAS_ONE | CompanyActivity::class, 'id_activity', 'id' |
| DEAL_ACTIVITY | HAS_ONE | CompanyActivity::class, 'id_activity', 'id' |
| USER | BELONGS_TO | User::class, 'id_user', 'id' |
| ACTIVITY_TYPE | HAS_ONE | ActivityType::class, 'id', 'id_activity_type' |
Read more about working with relations
