@@ -48,13 +48,13 @@ discard block |
||
| 48 | 48 | const AFTER_REGISTER = 'afterRegister'; |
| 49 | 49 | |
| 50 | 50 | //场景定义 |
| 51 | - const SCENARIO_CREATE = 'create';//后台或控制台创建用户 |
|
| 52 | - const SCENARIO_UPDATE = 'update';//后台或控制台修改用户 |
|
| 53 | - const SCENARIO_REGISTER = 'basic_create';//邮箱注册 |
|
| 54 | - const SCENARIO_EMAIL_REGISTER = 'email_create';//邮箱注册 |
|
| 55 | - const SCENARIO_MOBILE_REGISTER = 'mobile_create';//手机号注册 |
|
| 56 | - const SCENARIO_SETTINGS = 'settings';//更新 |
|
| 57 | - const SCENARIO_CONNECT = 'connect';//账户链接或自动注册新用户 |
|
| 51 | + const SCENARIO_CREATE = 'create'; //后台或控制台创建用户 |
|
| 52 | + const SCENARIO_UPDATE = 'update'; //后台或控制台修改用户 |
|
| 53 | + const SCENARIO_REGISTER = 'basic_create'; //邮箱注册 |
|
| 54 | + const SCENARIO_EMAIL_REGISTER = 'email_create'; //邮箱注册 |
|
| 55 | + const SCENARIO_MOBILE_REGISTER = 'mobile_create'; //手机号注册 |
|
| 56 | + const SCENARIO_SETTINGS = 'settings'; //更新 |
|
| 57 | + const SCENARIO_CONNECT = 'connect'; //账户链接或自动注册新用户 |
|
| 58 | 58 | const SCENARIO_PASSWORD = 'password'; |
| 59 | 59 | |
| 60 | 60 | /** |
@@ -95,8 +95,8 @@ discard block |
||
| 95 | 95 | static::SCENARIO_EMAIL_REGISTER => ['nickname', 'email', 'password'], |
| 96 | 96 | static::SCENARIO_MOBILE_REGISTER => ['mobile', 'password'], |
| 97 | 97 | static::SCENARIO_SETTINGS => ['username', 'email', 'password'], |
| 98 | - static::SCENARIO_CONNECT => ['nickname', 'email', 'password'],//链接账户密码可以为空邮箱可以为空 |
|
| 99 | - static::SCENARIO_PASSWORD => ['password'],//只修改密码 |
|
| 98 | + static::SCENARIO_CONNECT => ['nickname', 'email', 'password'], //链接账户密码可以为空邮箱可以为空 |
|
| 99 | + static::SCENARIO_PASSWORD => ['password'], //只修改密码 |
|
| 100 | 100 | ]); |
| 101 | 101 | } |
| 102 | 102 | |
@@ -22,27 +22,27 @@ |
||
| 22 | 22 | |
| 23 | 23 | $this->createTable($this->tableName, [ |
| 24 | 24 | 'id' => $this->primaryKey()->unsigned(), |
| 25 | - 'paid' => $this->boolean()->defaultValue(false),//boolean 是否已付款 |
|
| 26 | - 'refunded' => $this->boolean()->defaultValue(false),//boolean 是否存在退款信息 |
|
| 27 | - 'reversed' => $this->boolean()->defaultValue(false),//boolean 订单是否撤销 |
|
| 28 | - 'channel' => $this->string(50)->notNull(),//付款渠道 |
|
| 29 | - 'order_no' => $this->string()->notNull(),//商户订单号,适配每个渠道对此参数的要求,必须在商户的系统内唯一 |
|
| 30 | - 'client_ip' => $this->ipAddress()->notNull(),//发起支付请求客户端的 IP 地址 |
|
| 31 | - 'amount' => $this->unsignedInteger()->notNull(),//订单总金额(必须大于 0),单位为对应币种的最小货币单位,人民币为分 |
|
| 32 | - 'currency' => $this->string(3)->notNull(),//3 位 ISO 货币代码,人民币为 cny 。 |
|
| 33 | - 'subject' => $this->string(32)->notNull(),//商品标题,该参数最长为 32 个 Unicode 字符 |
|
| 34 | - 'body' => $this->string(128)->notNull(),//商品描述信息,该参数最长为 128 个 Unicode 字符 |
|
| 25 | + 'paid' => $this->boolean()->defaultValue(false), //boolean 是否已付款 |
|
| 26 | + 'refunded' => $this->boolean()->defaultValue(false), //boolean 是否存在退款信息 |
|
| 27 | + 'reversed' => $this->boolean()->defaultValue(false), //boolean 订单是否撤销 |
|
| 28 | + 'channel' => $this->string(50)->notNull(), //付款渠道 |
|
| 29 | + 'order_no' => $this->string()->notNull(), //商户订单号,适配每个渠道对此参数的要求,必须在商户的系统内唯一 |
|
| 30 | + 'client_ip' => $this->ipAddress()->notNull(), //发起支付请求客户端的 IP 地址 |
|
| 31 | + 'amount' => $this->unsignedInteger()->notNull(), //订单总金额(必须大于 0),单位为对应币种的最小货币单位,人民币为分 |
|
| 32 | + 'currency' => $this->string(3)->notNull(), //3 位 ISO 货币代码,人民币为 cny 。 |
|
| 33 | + 'subject' => $this->string(32)->notNull(), //商品标题,该参数最长为 32 个 Unicode 字符 |
|
| 34 | + 'body' => $this->string(128)->notNull(), //商品描述信息,该参数最长为 128 个 Unicode 字符 |
|
| 35 | 35 | //'extra',//特定渠道发起交易时需要的额外参数,以及部分渠道支付成功返回的额外参数 |
| 36 | - 'time_paid' => $this->unixTimestamp(),//订单支付完成时的 Unix 时间戳。(银联支付成功时间为接收异步通知的时间) |
|
| 37 | - 'time_expire' => $this->unixTimestamp(),//订单失效时间 |
|
| 38 | - 'transaction_no' => $this->string(64),//支付渠道返回的交易流水号。 |
|
| 36 | + 'time_paid' => $this->unixTimestamp(), //订单支付完成时的 Unix 时间戳。(银联支付成功时间为接收异步通知的时间) |
|
| 37 | + 'time_expire' => $this->unixTimestamp(), //订单失效时间 |
|
| 38 | + 'transaction_no' => $this->string(64), //支付渠道返回的交易流水号。 |
|
| 39 | 39 | //'refunds',//退款详情列表 |
| 40 | - 'amount_refunded' => $this->unsignedInteger()->notNull(),//已退款总金额,单位为对应币种的最小货币单位,例如:人民币为分。 |
|
| 41 | - 'failure_code' => $this->string(),//订单的错误码 |
|
| 42 | - 'failure_msg' => $this->string(),//订单的错误消息的描述。 |
|
| 40 | + 'amount_refunded' => $this->unsignedInteger()->notNull(), //已退款总金额,单位为对应币种的最小货币单位,例如:人民币为分。 |
|
| 41 | + 'failure_code' => $this->string(), //订单的错误码 |
|
| 42 | + 'failure_msg' => $this->string(), //订单的错误消息的描述。 |
|
| 43 | 43 | 'metadata' => $this->text(), |
| 44 | 44 | // 'credential',//支付凭证,用于客户端发起支付。 |
| 45 | - 'description' => $this->string(255),//订单附加说明,最多 255 个 Unicode 字符。 |
|
| 45 | + 'description' => $this->string(255), //订单附加说明,最多 255 个 Unicode 字符。 |
|
| 46 | 46 | 'created_at' => $this->unixTimestamp(), |
| 47 | 47 | ], $tableOptions); |
| 48 | 48 | } |