init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)
这个提交包含在:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Delivery\Model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
|
||||
class Post extends Model
|
||||
{
|
||||
|
||||
// 表名
|
||||
protected $name = 'paotui_post';
|
||||
|
||||
// 自动写入时间戳字段
|
||||
protected $autoWriteTimestamp = 'int';
|
||||
|
||||
// 定义时间戳字段名
|
||||
protected $createTime = 'createtime';
|
||||
protected $updateTime = 'updatetime';
|
||||
protected $deleteTime = false;
|
||||
|
||||
|
||||
public function order2()
|
||||
{
|
||||
return $this->belongsTo(\addons\shopro\model\Order::class, 'order_id', 'id', [], 'LEFT')->setEagerlyType(0);
|
||||
}
|
||||
|
||||
public function getTotalGoodsNumAttr() {
|
||||
return \addons\shopro\model\OrderItem::where('order_id', $this->order_id)->sum('goods_num');
|
||||
}
|
||||
|
||||
public function getGoodsTitleAttr() {
|
||||
return implode(',', \addons\shopro\model\OrderItem::where('order_id', $this->order_id)->column('goods_title'));
|
||||
}
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户