12345678910111213141516171819202122 |
- <?php
- namespace app\common\model;
- use think\Model;
- class UserTax extends Model
- {
- protected $type=[
- 'tax'=>'json',
- ];
- public static function fromOrder(Orders $orders){
- if($orders['tax']){
- self::create([
- 'user_id'=>$orders['user_id'],
- 'tax'=>$orders['tax'],
- ]);
- }
- }
- }
|