<?php

include_once SERVER_ROOT . '/data/dBase.php';

/*
 * 药方相关
 * @package data
 */

class dFormula extends dBase {
    protected $fieldlist = array(
        'tcm_formula' => array(
            'id',
            'uid',
            'name',
            'source',
            'original',
            'method',
            'remark',
            'sort',
            'is_delete',
            'user_id',
            'update_time',
            'create_time',
        ),
        'tcm_formula_herb' => array(
            'id',
            'formula_id',
            'herb_id',
            'num',
            'sort',
        ),
        'tcm_herb' => array(
            'id',
            'uid',
            'name',
            'desc',
        ),
        'tcm_collect_log' => array(
            'id',
            'collect_msg',
            'collect_time',
        ),
        'tcm_formula_use_log' => array(
            'id',
            'uid',
            'formula_id',
            'use_num',
        ),
        'tcm_unit_conv' => array(
            'id',
            'unit_type',
            'num',
            'from',
            'status',
            'create_date',
        ),
        'tcm_user_conv' => array(
            'id',
            'uid',
            'unit_type',
            'conv_id',
        ),
    );

    protected $primary_keys = array(
        'tcm_formula' => 'id',
        'tcm_formula_herb' => 'id',
        'tcm_herb' => 'id',
        'tcm_collect_log' => 'id',
        'tcm_formula_use_log' => 'id',
        'tcm_unit_conv' => 'id',
        'tcm_user_conv' => 'id',
    );
}