| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?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 string $truenname
- * @property string $mobile
- * @property string $idcard
- * @property string $city
- * @property mixed $city_path
- * @property integer $sex 1男2女
- * @property integer $married 1已婚2未
- * @property integer $child 1有2无
- * @property mixed $create_at 创建时间
- */
- class BlueExpert 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";
-
- /**
- * 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 open(): HasOne
- {
- return $this->hasOne(BlueUserOpen::class,"openid","openid");
- }
- public function platform(): HasMany
- {
- return $this->hasMany(BlueExpertPlatform::class,"openid","openid");
- }
- public function level(): HasOne
- {
- return $this->hasOne(BlueExpertLevel::class,"id","group_id");
- }
- }
|