123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace app\common\model\card;
- use app\common\model\BaseModel;
- use app\common\model\store\User as UserStore;
- /**
- * 米卡订单备注模型
- * @package app\common\model
- */
- class RiceCardOrderRemark extends BaseModel
- {
- protected $name = 'rice_card_order_remark';
- protected $append = [
- 'admin_name'
- ];
- public function getAdminNameAttr($value)
- {
- $admin = UserStore::where('store_user_id', $this->admin_id)->find();
- if ($admin) {
- return $admin->user_name ?? '';
- }
- return '';
- }
-
- /**
- * 获取记录
- * @param int $id
- * @param array $with
- * @return static
- */
- public static function detail(int $id, array $with = [])
- {
- return static::get($id, $with);
- }
-
- }
|