28 lines
652 B
PHP
28 lines
652 B
PHP
<?php
|
|
namespace app\model;
|
|
|
|
use think\Model;
|
|
|
|
class ThirdUser extends Model
|
|
{
|
|
protected $table = 'bps.bps_third_user';
|
|
// 设置主键
|
|
protected $pk = 'id';
|
|
// 设置自动时间戳
|
|
// protected $autoWriteTimestamp = true;
|
|
|
|
// 定义时间戳字段
|
|
// protected $createTime = 'create_at'; // 创建时间字段
|
|
// protected $updateTime = 'update_at'; // 更新时间字段
|
|
|
|
// 字段类型映射
|
|
protected $casts = [
|
|
// 'id' => 'int',
|
|
];
|
|
|
|
// 与广告主模型的关联
|
|
public function advertisers()
|
|
{
|
|
return $this->hasMany(ThirdUserAdvertiser::class, 'doc_', 'id');
|
|
}
|
|
} |