You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
class StockCompany extends SoftDeletesModel
|
|
|
|
|
{
|
|
|
|
|
public $table = 'stock_companys';
|
|
|
|
|
|
|
|
|
|
protected $appends = ['is_after_enrollment_text'];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取是否入学后上市的文本
|
|
|
|
|
*/
|
|
|
|
|
public function getIsAfterEnrollmentTextAttribute()
|
|
|
|
|
{
|
|
|
|
|
$array = [
|
|
|
|
|
0 => '否',
|
|
|
|
|
1 => '是',
|
|
|
|
|
];
|
|
|
|
|
return $array[$this->is_after_enrollment] ?? '否';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 关联公司
|
|
|
|
|
*/
|
|
|
|
|
public function company()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Company::class, 'company_id', 'id');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|