123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- namespace app\models\store;
- use crmeb\basic\BaseModel;
- use crmeb\traits\ModelTrait;
- class StoreOrderStatus extends BaseModel
- {
-
- protected $name = 'store_order_status';
- use ModelTrait;
- public static function status($oid,$change_type,$change_message,$change_time = null)
- {
- if($change_time == null) $change_time = time();
- return self::create(compact('oid','change_type','change_message','change_time'));
- }
- public static function getTime($oid,$change_type)
- {
- return self::where('oid',$oid)->where('change_type',$change_type)->value('change_time');
- }
- }
|