# booktics/1.0.22/base/models/customer-model.php

Booktics – Appointment Booking Calendar for Service Businesses, version 1.0.22. 65 lines.

- Page: https://pluginprobe.com/plugins/booktics/1.0.22/code/base/models/customer-model.php
- Raw: https://pluginprobe.com/plugins/booktics/1.0.22/raw/base/models/customer-model.php
- Modified: 2025-07-29T17:39:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/booktics/1.0.22/code/base/models/customer-model.php#L10-L20`.

```php
<?php

namespace Booktics\Models;

use Booktics\Abstracts\Booktics_Database;
use Booktics\Abstracts\User_Model;

class Customer_Model extends User_Model {
    /**
     * Store specific user role
     *
     * @var string
     */
    protected $role = 'booktics_customer';

    /**
     * Store specific meta prefix
     *
     * @var string
     */
    protected $meta_prefix = '_customer_';

    /**
     * Store user data
     *
     * @var array
     */
    protected $fillable = [
        'id'              => '',
        'display_name'    => '',
        'first_name'      => '',
        'last_name'       => '',
        'user_email'      => '',
        'image'           => '',
        'user_login'      => '',
        'phone'           => '',
        'role'            => [],
        'status'          => '',
        'user_registered' => '',
        'total_booking'   => '',
        'total_amount'    => '',
    ];

    /**
     * Display name attribute
     *
     * @param $customer
     *
     * @return string
     */
    public function get_display_name_attribute( $customer ) {
        return $customer->first_name . ' ' . $customer->last_name;
    }

    /**
     * email attribute
     *
     * @param $customer
     *
     * @return string
     */
    public function get_email_attribute( $customer ) {
        return $customer->email ?? $customer->user_email;
    }
}
```
