You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<?php
declare (strict_types=1);namespace App\Model\v3;use App\Model\Model;/** */class FinancialRecord extends Model{ /** * 当面付商户首单奖励限制的订单金额 */ const OFL_FIRST_AWARD_LIMIT_AMOUNT = 3;
/** * 虚拟账户 */ const ACCOUNT_LEDGER = -1;
/** * 账户类型 * * 总账 * USER_TYPE_LEDGER / -1 * * 用户 * USER_TYPE_USER / 1 * * MP用户账户,服务商、市场经理、服务站点等 * USER_TYPE_MP / 2 * USER_TYPE_MM / 3 * USER_TYPE_CS / 4 * * 商户账户 * USER_TYPE_STORE / 5 */ const USER_TYPE_LEDGER = -1; const USER_TYPE_USER = 1; const USER_TYPE_MP = 2; const USER_TYPE_MM = 3; const USER_TYPE_CS = 4; const USER_TYPE_STORE = 5;
/** * 关联类型 * * 订单 * SOURCE_TYPE_ORDER / 1 */ const SOURCE_TYPE_NONE = 0; const SOURCE_TYPE_ORDER = 1;
/** * 流水类型,大的分类,<100是奖励分账等收入项 >=100是提现消费等支出项 */ const MONEY_TYPE_CS_PLAT_NEW_USER = 1; // 社区服务点新用户奖励(线上订单完成)
const MONEY_TYPE_CS_FIRST_ORDER = 2; // 社区服务点新用户线上首单奖励(线上订单完成)
const MONEY_TYPE_CS_OL_ORDER = 3; // 社区服务点用户线上订单分账(线上订单完成)
const MONEY_TYPE_STORE_PLAT_NEW_USER = 4; // 商户平台新用户奖励
const MONEY_TYPE_STORE_FIRST_ORDER = 5; // 商户当日首单奖励
const MONEY_TYPE_STORE_OL_ORDER_COMP = 6; // 商户线上订单完成收入
const MONEY_TYPE_STORE_OFL_ORDER_COMP = 7; // 商户线下订单完成收入
const MONEY_TYPE_USER_OL_ORDER_REFUND = 8; // 用户线上订单退款
const MONEY_TYPE_MM_PLAT_NEW_USER = 9; // 市场经理发展新用户
const MONEY_TYPE_MM_PLAT_NEW_STORE = 10; // 市场经理发展新商户
const MONEY_TYPE_MP_PLAT_NEW_USER = 11; // 服务商发展新用户
const MONEY_TYPE_MP_PLAT_NEW_STORE = 12; // 服务商发展新商户
const MONEY_TYPE_MP_OL_ORDER = 13; // 服务商线上订单分账(线上订单完成)
const MONEY_TYPE_USER_OFL_ORDER = 100; // 用户线下支付订单
const MONEY_TYPE_USER_OL_ORDER = 101; // 用户线上支付订单
const MONEY_TYPE_MP_WITHDRAW = 102; // 服务商提现类型
const MONEY_TYPE_MM_WITHDRAW = 103; // 市场经理提现类型
const MONEY_TYPE_CS_WITHDRAW = 104; // 社区提现类型
const MONEY_TYPE_STORE_WITHDRAW = 105; // 商户提现类型
/** * 状态 */ const STATUS_NORMAL = 1; const STATUS_ABNORMAL = 2;
/** * The table associated with the model. * * @var string */ protected $table = 'lanzu_financial_record'; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'user_id', 'user_type', 'money', 'money_type', 'source_id', 'source_type', 'desc', 'comment', 'status', ]; protected $appends = [ 'created_at_text', ];
public function getCreatedAtTextAttribute() { return date('Y-m-d H:i:s', $this->attributes['created_at']); } /** * The attributes that should be cast to native types. * * @var array */ protected $casts = [];}
|