41 lines
862 B
PHP
Executable File
41 lines
862 B
PHP
Executable File
<?php
|
|
/**
|
|
* @createtime 2023/4/20
|
|
* @author wild
|
|
* @copyright PhpStorm
|
|
*/
|
|
|
|
|
|
namespace App\Model\Seller;
|
|
|
|
use App\Model\BaseModel;
|
|
use App\Model\Order;
|
|
|
|
class ShopCooperateBill extends BaseModel
|
|
{
|
|
const TYPE_INCR = 1; // 加款
|
|
const TYPE_REDUCE = 2; // 扣款
|
|
const TYPE_TICKET = 3; // 出票
|
|
const TYPE_WINED = 4; // 中奖
|
|
|
|
|
|
public function getTypeTitle() {
|
|
switch ($this->type) {
|
|
case self::TYPE_INCR:
|
|
return '店主加款';
|
|
case self::TYPE_REDUCE:
|
|
return '店主扣款';
|
|
case self::TYPE_TICKET:
|
|
return '出票';
|
|
case self::TYPE_WINED:
|
|
return '中奖';
|
|
}
|
|
return '-';
|
|
}
|
|
|
|
public function order()
|
|
{
|
|
return $this->hasOne(Order::class, 'id', 'order_id');
|
|
}
|
|
}
|