'userId', self::RECEIVE_LOGIN_NAME => 'loginName' ]; /** * 分账来源类型: 商城 */ const FROM_STORE = 0; /** * 分账来源类型: 平台 */ const FROM_PLATFORM = 1; /** * 分账来源类型: 推荐 */ const FROM_RECOMMEND = 2; /** * 分账来源类型: 消费返利 */ const FROM_SELF = 5; /** * 分账来源类型: 服务商 */ const FROM_SERVICE_PROVIDER = 3; /** * 分账来源类型: 商城间分销 */ const FROM_STORE_TO_STORE = 4; /** * 分账来源类型: 排队返利 */ const FROM_QUEUE = 6; public static $validFrom = [ self::FROM_STORE, self::FROM_RECOMMEND, self::FROM_PLATFORM, self::FROM_SERVICE_PROVIDER, self::FROM_STORE_TO_STORE, self::FROM_SELF ]; public static $validNewFrom = [ self::FROM_STORE, self::FROM_RECOMMEND, self::FROM_PLATFORM, self::FROM_STORE_TO_STORE, self::FROM_SERVICE_PROVIDER, self::FROM_SELF ]; /** * 分账执行方式:微信分账 */ const EXECUTE_TYPE_NORMAL = 0; /** * 分账执行方式:微信转账 */ const EXECUTE_TYPE_TRANSFER = 1; /** * 分账执行方式:支付宝分账 */ const EXECUTE_TYPE_ALIPAY = 2; /** * 分账执行方式:汇付分账 */ const EXECUTE_TYPE_HUIFU = 3; public function behaviors() { return [ [ 'class' => TimestampBehavior::class, 'attributes' => [ ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'], ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at' ] ] ]; } /** * {@inheritdoc} */ public function rules() { return [ [['store_id','to_store_id','saas_id', 'execute_type', 'is_delete', 'created_at', 'updated_at', 'type', 'is_pay', 'from', 'user_id', 'is_platform','goods_id','queue_id'], 'integer'], [['amount', 'rate'], 'number'], [['name', 'description', 'account', 'transaction_id', 'order_no', 'err_code', 'err_code_des', 'order_id', 'remark', 'yunst_order_no'], 'string', 'max' => 255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'store_id' => 'Store ID', 'saas_id' =>'商盟用户id', 'name' => '接收方姓名', 'type' => '分账接收方类型,1:openid, 2:merchant_id, 3:sub_openid', 'description' => '分账描述', 'user_id' => 'USER ID', 'account' => '分账接收方账户', 'transaction_id' => '微信回执单号', 'order_no' => '订单号', 'is_pay' => '是否支付', 'amount' => '金额', 'rate' => '比例', 'order_id' => '请求分账后微信返回的订单id', 'from' => '0:店铺分销,1:saas平台分销', 'err_code' => '分账错误代码', 'err_code_des' => '分账错误信息', 'remark' => '标注类型,例如:店铺分销', 'execute_type' => '0:微信分账,1:微信转账', 'is_delete' => 'Is Delete', 'created_at' => 'Add Time', 'updated_at' => 'Update Time', 'is_platform' => "是否是平台" ]; } }