<?php
/**
 * 职工管理Dao
 * Created by PhpStorm.
 * User: 小威
 * Date: 2019/10/31
 * Time: 18:00
 */

namespace JinDouYun\Dao\Department;

use JinDouYun\Dao\BaseDao;

class DStaffComment extends BaseDao
{
    public function __construct($serviceDB = 'default')
    {
        $this->_table = 'staff_comment';
        $this->_primary = 'id';
        $this->_fields = [
            'id',// int unsigned NOT NULL AUTO_INCREMENT,
            'en_id',// int NOT NULL,
            'uid',// int NOT NULL COMMENT '员工id',
            'customer_id',// int NOT NULL COMMENT '用户id',
            'order_id',// int NOT NULL,
            'comment',// text COLLATE utf8mb4_general_ci NOT NULL COMMENT '评论',
            'score',// int NOT NULL COMMENT '评分',
            'createTime',// int NOT NULL,
        ];
        $this->_readonly = ['id'];
        $this->_create_autofill = [
            'createTime' => time()
        ];
        parent::__construct($serviceDB);
    }
}