|
@@ -0,0 +1,19 @@
|
|
|
+<?php
|
|
|
+namespace app\common\model;
|
|
|
+use think\Model;
|
|
|
+// 洗涤类型
|
|
|
+class WashType extends Model
|
|
|
+{
|
|
|
+
|
|
|
+ // 获取分类
|
|
|
+ public static function getWashType($is_all,$is_column = 0)
|
|
|
+ {
|
|
|
+ $list = static::field('id,title')->when($is_all,function ($q)use ($is_all){
|
|
|
+ if(!$is_all) $q->where('is_deleted',0)->where('status',1);
|
|
|
+ })->order('sort desc ,id desc')
|
|
|
+ ->select()->toArray();
|
|
|
+ return $is_column ? array_column($list,null,'id') : $list;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|