src/TMS/ActivityStep.php

Summary

Maintainability
C
7 hrs
Test Coverage
<?php

/**
 *
 * @author hadi <mohammad.hadi.mansouri@dpq.co.ir>
 *
 */
class TMS_ActivityStep extends TMS_DocumentedModel
{

    /**
     *
     * {@inheritdoc}
     * @see TMS_DocumentedModel::init()
     */
    function init()
    {
        parent::init();
        $this->_a['table'] = 'tms_activity_steps';
        $this->_a['verbose'] = 'TMS Activity Step';
        $this->_a['cols'] = array_merge($this->_a['cols'], array(
            'order' => array(
                'type' => 'Integer',
                'is_null' => false,
                'default' => 0,
                'editable' => true,
                'readable' => true
            ),
            'is_checked' => array(
                'type' => 'Boolean',
                'is_null' => false,
                'default' => false,
                'editable' => true
            ),
            /*
             * Relations
             */
            'activity_id' => array(
                'type' => 'Foreignkey',
                'model' => 'TMS_Activity',
                'name' => 'activity',
                'relate_name' => 'steps',
                'graphql_name' => 'activity',
                'graphql_field' => true,
                'is_null' => false,
                'editable' => true,
                'readable' => true
            )
        ));
    }
}