This commit is contained in:
巴掌 committed 2021-12-17 15:34:44 +08:00
1 parent 8841732680
commit 166fcbb3ed
8 files changed
+134 -125

No files matched your search

+20
View File
@@ -15,6 +15,7 @@ class ClassRoom extends BaseModel
,'title' => 'varchar'
,'weizhi' => 'varchar'
,'category_id' => 'int'
,'shangke' => 'tinyint'
,'status' => 'tinyint'
,'create_time' => 'int'
,'update_time' => 'int'
@@ -68,4 +69,23 @@ class ClassRoom extends BaseModel
}
// 性别获取器
public function getShangkeAttr($value)
{
$shangke = [
'0' => '否'
,'1' => '是'
];
$str = '';
if(isset($shangke[$value]))
{
$str = $shangke[$value];
}else{
$str = '未知';
}
return $str;
}
}