49 lines
1.7 KiB
PHP
49 lines
1.7 KiB
PHP
|
<?php
|
||
|
|
||
|
class CmsPsPost extends ObjectModel {
|
||
|
|
||
|
public $id_post;
|
||
|
public $id_category;
|
||
|
public $date_add;
|
||
|
public $date_upd;
|
||
|
public $active;
|
||
|
|
||
|
public $title;
|
||
|
public $slug;
|
||
|
public $intro;
|
||
|
public $content;
|
||
|
public $meta_title;
|
||
|
public $meta_desc;
|
||
|
|
||
|
/**
|
||
|
* @see ObjectModel::$definition
|
||
|
*/
|
||
|
public static $definition = array(
|
||
|
'table' => 'cmsps_posts',
|
||
|
'primary' => 'id_post',
|
||
|
'multilang' => TRUE,
|
||
|
'multilang_shop' => TRUE,
|
||
|
'fields' => array(
|
||
|
'id_category' => array('type' => self::TYPE_INT, 'validate' => 'isInt', 'required' => TRUE),
|
||
|
'active' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),
|
||
|
|
||
|
// Lang fields
|
||
|
'title' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName', 'required' => TRUE, 'size' => 40),
|
||
|
'slug' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName'),
|
||
|
'intro' => array('type' => self::TYPE_HTML, 'lang' => TRUE, 'validate' => 'isCleanHtml'),
|
||
|
'content' => array('type' => self::TYPE_HTML, 'lang' => TRUE, 'validate' => 'isCleanHtml'),
|
||
|
'meta_title' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName'),
|
||
|
'meta_desc' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName'),
|
||
|
|
||
|
'date_add' => array('type' => self::TYPE_DATE),
|
||
|
'date_upd' => array('type' => self::TYPE_DATE)
|
||
|
),
|
||
|
);
|
||
|
|
||
|
public function __construct($id = NULL, $id_lang = NULL, $id_shop = NULL) {
|
||
|
parent::__construct($id, $id_lang, $id_shop);
|
||
|
//Adding feedback to multishop
|
||
|
}
|
||
|
|
||
|
}
|