<?php

namespace app\model\blue;

use app\extra\basic\Model;
use think\model\relation\HasMany;
use think\model\relation\HasOne;


/**
 * @property integer $id (主键)
 * @property mixed $openid 
 * @property mixed $source
 */
class BlueExpertPlatform extends Model
{
    /**
     * The connection name for the model.
     *
     * @var string|null
     */
    protected $connection = 'mysql';
    
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected string $table = "blue_expert_platform";
    
    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected string $primaryKey = "id";
    
    /**
     * Indicates if the model should be timestamped.
     *
     * @var bool
     */
    public bool $timestamps = false;

    public function user(): HasOne
    {
        return $this->hasOne(BlueExpert::class,"openid","openid");
    }

    public function job(): HasMany
    {
        return $this->hasMany(BlueTaskUser::class,"openid","openid");
    }

}
