// +---------------------------------------------------------------------- namespace app\common\model\user; use app\common\model\BaseModel; class UserBill extends BaseModel { /** * @return string * @author xaboy * @day 2020-03-30 */ public static function tablePk(): string { return 'bill_id'; } /** * @return string * @author xaboy * @day 2020-03-30 */ public static function tableName(): string { return 'user_bill'; } public function user() { return $this->hasOne(User::class, 'uid', 'uid'); } }