Model Contact
namespace HubletoApp\Customers\Models\Contact
List of contact information for a person
Constants
This model does not define constants.
Properties
Property | Value |
---|---|
eloquentClass | Eloquent\Contact::class |
table | contacts |
lookupSqlValue | [TABLE].value |
Data Scructure
Column | Title | ADIOS Type | Length | Required | Additional parameters |
---|---|---|---|---|---|
id | ID | int | TRUE | ||
type | Contact type | varchar | TRUE | enum_values: [email => Email, phone_number => Phone Number, other => Other] | |
value | Value | varchar | TRUE | ||
id_person | Person | lookup | TRUE | ||
id_contact_type | Person | lookup | TRUE |
Foreign Keys
Column | Model | Relation | OnUpdate | OnDelete |
---|---|---|---|---|
id_person | Modules\Core\Customers\Models\Person | 1:1 | Cascade | Restrict |
id_contact_type | Modules\Core\Settings\Models\ContactType | 1:1 | Cascade | Restrict |
Indexes
Only default indexes are used.
Relations
Relation | Type | Other parameters |
---|---|---|
PERSON | BELONGS_TO | Person::class, 'id_person', 'id' |
CONTACT_TYPE | HAS_ONE | ContactType::class, 'id_contact_type', 'id' |