<commit_before><?php

namespace common\models;

use common\models\_base\TimekeepingBase;
use Yii;

/**
 * This is the model class for table "timekeeping".
 *
 * @property integer $id
 * @property integer $status
 * @property string $card_code
 * @property string $staff_name
 * @property integer $tap_id
 * @property string $type
 * @property string $created_time
 * @property string $image
 * @property integer $staff_id
 */
class Timekeeping extends TimekeepingBase
{
    public static  function add($params){
        $tat = new self;
        $tat->attributes = $params;
        return $tat->save(false);
    }
    public static  function getByUserId($userId=0){
        $return = self::find()->where(['created_by'=>$userId])->all();
        $rt = array();
        foreach ($return as $value)
        {
            $value->image = 'http://api.thietbianninh.com/kute.jpg';<commit_msg>Update staff<commit_after><?php

namespace common\models;

use common\models\_base\TimekeepingBase;
use Yii;

/**
 * This is the model class for table "timekeeping".
 *
 * @property integer $id
 * @property integer $status
 * @property string $card_code
 * @property string $staff_name
 * @property integer $tap_id
 * @property string $type
 * @property string $created_time
 * @property string $image
 * @property integer $staff_id
 */
class Timekeeping extends TimekeepingBase
{
    public static  function add($params){
        $tat = new self;
        $tat->attributes = $params;
        return $tat->save(false);
    }
    public static  function search($card_code=0,$staff_name=''){
        $staff = Timekeeping::find()->where(['and', ['card_code' => $card_code]])
            ->orFilterWhere(['like', 'staff_name', $staff_name])
            ->all();
        $rt = array();
        foreach ($staff as $value)
        {
            $value->image = 'http://api.thietbianninh.com/kute.jpg';
{'fraction_non_alphanumeric': 0.14110756123535675, 'fraction_numerical': 0.0010649627263045794, 'mean_word_length': 3.213004484304933, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4912258', 'n_tokens_mistral': 554, 'n_tokens_neox': 557, 'n_words': 148}