GoShopCoupon.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use app\constants\OptionSetting;
  9. use app\modules\alliance\models\CurrencyForm;
  10. use app\plugins\scanCodePay\models\Order as ScanCodePayOrder;
  11. use app\plugins\scanCodePay\models\Order as ScanOrder;
  12. use yii\db\ActiveRecord;
  13. use yii\behaviors\TimestampBehavior;
  14. use Yii;
  15. use yii\helpers\Json;
  16. /**
  17. * This is the model class for table "{{%go_shop_coupon}}".
  18. *
  19. * @property integer $id
  20. * @property integer $store_id
  21. * @property integer $is_order_no
  22. * @property float $amount
  23. * @property integer $is_bonus
  24. * @property integer $is_scan
  25. * @property integer $is_delete
  26. * @property integer $created_at
  27. * @property string $idempotent_type
  28. * @property string $phone
  29. * @property string $order_no
  30. */
  31. class GoShopCoupon extends \yii\db\ActiveRecord
  32. {
  33. public static function tableName()
  34. {
  35. return '{{%go_shop_coupon}}';
  36. }
  37. public function behaviors()
  38. {
  39. return [
  40. [
  41. 'class' => TimestampBehavior::class,
  42. 'attributes' => [
  43. ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'],
  44. ]
  45. ]
  46. ];
  47. }
  48. public function rules()
  49. {
  50. return [
  51. [['store_id', 'is_order_no', 'is_delete', 'is_bonus', 'is_scan','id'], 'integer'],
  52. [['amount'], 'number'],
  53. [['phone','order_no','idempotent_type'], 'string'],
  54. [['created_at'], 'safe']
  55. ];
  56. }
  57. }