RuleKeyword.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. namespace addons\Wechat\common\models;
  3. use common\behaviors\MerchantStoreBehavior;
  4. /**
  5. * This is the model class for table "{{%addon_wechat_rule_keyword}}".
  6. *
  7. * @property int $id
  8. * @property int|null $merchant_id 商户id
  9. * @property int|null $store_id 店铺ID
  10. * @property int|null $rule_id 规则ID
  11. * @property string $module 模块名
  12. * @property string $content 内容
  13. * @property int $type 类别
  14. * @property int $sort 优先级
  15. * @property int|null $status 状态[-1:删除;0:禁用;1启用]
  16. */
  17. class RuleKeyword extends \yii\db\ActiveRecord
  18. {
  19. use MerchantStoreBehavior;
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public static function tableName()
  24. {
  25. return '{{%addon_wechat_rule_keyword}}';
  26. }
  27. /**
  28. * {@inheritdoc}
  29. */
  30. public function rules()
  31. {
  32. return [
  33. [['merchant_id', 'store_id', 'rule_id', 'type', 'sort', 'status'], 'integer'],
  34. [['module'], 'string', 'max' => 50],
  35. [['content'], 'string', 'max' => 255],
  36. ];
  37. }
  38. /**
  39. * {@inheritdoc}
  40. */
  41. public function attributeLabels()
  42. {
  43. return [
  44. 'id' => 'ID',
  45. 'merchant_id' => '商户id',
  46. 'store_id' => '店铺ID',
  47. 'rule_id' => '规则ID',
  48. 'module' => '模块名',
  49. 'content' => '内容',
  50. 'type' => '类别',
  51. 'sort' => '优先级',
  52. 'status' => '状态[-1:删除;0:禁用;1启用]',
  53. ];
  54. }
  55. }
粤ICP备19079148号