<?php

namespace app\admin\model;

use app\BaseModel;

class Keyword extends BaseModel
{
    protected $autoWriteTimestamp = true;
    protected $createTime = 'created_at';
    protected $updateTime = 'updated_at';
    public function languages()
    {
        return $this->hasMany(KeywordLanguages::class, 'keyword_id')
            ->order('language_code', 'asc')
            ->field(['keyword_id','language_code','name','weight','status']);
    }
}