# erp/1.3.8/includes/framework/Model.php

ERP: Complete HR, Accounting &amp; CRM Suite Built for WooCommerce, version 1.3.8. 40 lines.

- Page: https://pluginprobe.com/plugins/erp/1.3.8/code/includes/framework/Model.php
- Raw: https://pluginprobe.com/plugins/erp/1.3.8/raw/includes/framework/Model.php
- Modified: 2016-07-26T15:05:24+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/erp/1.3.8/code/includes/framework/Model.php#L10-L20`.

```php
<?php

namespace WeDevs\ERP\Framework;

/**
 * Class Model
 *
 * @package WeDevs\ERP\Framework
 */
class Model extends \WeDevs\ORM\Eloquent\Model {

    /**
     * Get the table name with WP prefix
     *
     * @return string
     */
    public function getTable() {
        return $this->getConnection()->db->prefix . $this->table;
    }

    /**
     * Set the value of the "created at" attribute.
     *
     * @param  mixed  $value
     * @return void
     */
    public function setCreatedAt( $value ) {
        $this->{static::CREATED_AT} = current_time( 'mysql' );
    }

    /**
     * Set the value of the "updated at" attribute.
     *
     * @param  mixed  $value
     * @return void
     */
    public function setUpdatedAt( $value ) {
        $this->{static::UPDATED_AT} = current_time( 'mysql' );
    }
}
```
