Advertisement
Guest User

Untitled

a guest
Sep 28th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.87 KB | None | 0 0
  1. <?php namespace Acrontum\Catalogue\Models;
  2.  
  3. use Model;
  4.  
  5. /**
  6.  * Model
  7.  */
  8. class Category extends Model
  9. {
  10.     use \October\Rain\Database\Traits\Validation;
  11.     use \October\Rain\Database\Traits\SimpleTree;
  12.     /*
  13.      * Validation
  14.      */
  15.     public $rules = [
  16.     ];
  17.  
  18.     /*
  19.      * Disable timestamps by default.
  20.      * Remove this line if timestamps are defined in the database table.
  21.      */
  22.     public $timestamps = false;
  23.  
  24.     /**
  25.      * @var string The database table used by the model.
  26.      */
  27.     public $table = 'acrontum_catalogue_category';
  28.  
  29.     public $attachOne = [
  30.         'image' => 'System\Models\File'
  31.     ];
  32.  
  33.     /**
  34.      * @var array Relations
  35.      */
  36.     public $belongsToMany = [
  37.         'products' => [
  38.             'Acrontum\Catalogue\Models\Product',
  39.             'table' => 'acrontum_catalogue_category_products'
  40.         ]
  41.     ];
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement