'全额退款', self::REFUND_TYPE_PART => '部分退款' ]; public static $status = [ self::STATUS_UNTREATED => '未处理', self::STATUS_ACCEPT => '已同意,待买家确认', self::STATUS_CONFIRM => '用户已确认', self::STATUS_REJECT => '已拒绝', self::STATUS_FINISH => '退款成功', self::STATUS_CANCEL => '已取消' ]; public static $refundMode = [ self::REFUND_MODE_MONEY => '仅退款', self::REFUND_MODE_MONEY_GOODS => '退货退款' ]; /** * {@inheritdoc} */ public static function tableName() { return 'ats_after_sale'; } /** * {@inheritdoc} */ public function rules() { return [ [['user_id', 'order_goods_id', 'amount', 'count', 'apply_at', 'dealt_at', 'finish_at', 'operator_id', 'refund_type', 'status', 'reason', 'refund_mode'], 'integer'], [['description', 'image', 'remarks'], 'string'], [['wx_refund_id', 'after_sale_sn'], 'string', 'max' => 64], [['take_shipping_sn'], 'string', 'max' => 50], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'id', 'wx_refund_id' => '微信退款单号', 'after_sale_sn' => '售后单号', 'user_id' => '用户id', 'order_goods_id' => '订单商品id', 'amount' => '退货时实际退的金额', 'count' => '退货的商品数量', 'apply_at' => '申请时间', 'dealt_at' => '处理时间', 'finish_at' => '完成时间', 'operator_id' => '操作者', 'refund_type' => '退款类型', 'description' => '描述', 'image' => '图片', 'status' => '处理状态', 'reason' => '退换货理由', 'remarks' => '店家备注', 'take_shipping_sn' => '用户发货物流单号', 'refund_mode' => '退款方式', ]; } public function getGoods() { return $this->hasOne(OrderGoods::className(), ['id' => 'order_goods_id']); } }