GiveIntegralRules.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use yii\db\ActiveRecord;
  9. /**
  10. * Class GiveIntegralRules
  11. * @property integer $id
  12. * @property integer $rate
  13. * @property integer $start_date
  14. * @property integer $end_date
  15. * @property integer $status
  16. * @property integer $created_at
  17. * @property integer $is_delete
  18. */
  19. class GiveIntegralRules extends ActiveRecord
  20. {
  21. public static function tableName()
  22. {
  23. return '{{%give_integral_rules}}';
  24. }
  25. public function rules()
  26. {
  27. return [
  28. [["id", "start_date", "end_date", "status", "created_at", "is_delete"], 'integer'],
  29. [['rate'], 'number'],
  30. ];
  31. }
  32. public function attributeLabels()
  33. {
  34. return [
  35. "id" => "ID",
  36. "rate" => "赠送积分比例",
  37. "start_date" => "开始时间",
  38. "end_date" => "结束时间",
  39. "status" => "1启用 2禁用",
  40. "created_at" => "创建时间",
  41. "is_delete" => "是否删除",
  42. ];
  43. }
  44. public function getFaceStore()
  45. {
  46. return $this->hasMany(RulesFaceStore::className(), ['rule_id' => 'id']);
  47. }
  48. public function getGiveIntegralStore()
  49. {
  50. return $this->hasMany(RulesGiveIntegralStore::className(), ['rule_id' => 'id']);
  51. }
  52. }