1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- namespace app\admin\model;
- use support\Db;
- use support\Model;
- /**
- * 角色模型
- * Class Users
- * @package app\admin\model
- */
- class PackageOrderDetail extends Model
- {
- /**
- * The table associated with the model.
- *
- * @var string
- */
- protected $table = 'package_order_detail';
- public $timestamps = false;
- /**
- * Notes:获取产品列表
- * @param string $keywords
- * @param int $page
- * @param int $limit
- * @return array
- * User: QJF
- * Date: 2022/9/20
- */
- public static function getPackageOrderInfo($keywords)
- {
- $list = static::select('*')
- ->orderBy('goods_update_time','DESC')
- ->get();
- $count = static::count();
- return [$list, $count];
- }
- public function getDetailCreateTimeAttribute($value)
- {
- return date('Y-m-d H:i:s', $value);
- }
- /**
- * Notes:插入子订单数据
- * @param array $data
- * @return false|int
- * User: yym
- * Date: 2022/9/27
- */
- public static function insertData(array $data)
- {
- if(empty($data))
- {
- return false;
- }
- return static::insertGetId($data);
- }
- }
|