GoodsChainLevel.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use Yii;
  9. use yii\behaviors\TimestampBehavior;
  10. /**
  11. * This is the model class for table "{{%goods_chain_level}}".
  12. *
  13. * @property integer $id
  14. * @property integer $goods_id
  15. * @property integer $is_open
  16. * @property integer $value
  17. * @property integer $type
  18. */
  19. class GoodsChainLevel extends \yii\db\ActiveRecord
  20. {
  21. /**
  22. * @inheritdoc
  23. */
  24. public static function tableName()
  25. {
  26. return '{{%goods_chain_level}}';
  27. }
  28. /**
  29. * @inheritdoc
  30. */
  31. public function rules()
  32. {
  33. return [
  34. [['goods_id', 'is_open', 'type'], 'integer'],
  35. [['value'], 'string'],
  36. [['type'], 'default', 'value' => 1],
  37. ];
  38. }
  39. /**
  40. * @inheritdoc
  41. */
  42. public function attributeLabels()
  43. {
  44. return [
  45. 'id' => 'ID',
  46. 'goods_id' => 'Goods ID',
  47. 'is_open' => '是否开启',
  48. 'value' => '配置信息json',
  49. 'type' => '类型,1:固定金额, 2: 百分比',
  50. ];
  51. }
  52. }