ReportSetting.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. use yii\behaviors\TimestampBehavior;
  10. /**
  11. * This is the model class for table "{{%q_and_a_ad_setting}}".
  12. *
  13. * @property int $id
  14. * @property int $store_id
  15. * @property int $award_integral
  16. * @property int $see_num
  17. * @property string $first_commission
  18. * @property string $second_commission
  19. * @property string $third_commission
  20. * @property string $adpid
  21. * @property int $updated_at
  22. */
  23. class ReportSetting extends \yii\db\ActiveRecord
  24. {
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public static function tableName()
  29. {
  30. return '{{%report_setting}}';
  31. }
  32. public function behaviors()
  33. {
  34. return [
  35. [
  36. 'class' => TimestampBehavior::class,
  37. 'attributes' => [
  38. ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at'],
  39. ]
  40. ]
  41. ];
  42. }
  43. /**
  44. * {@inheritdoc}
  45. */
  46. public function rules()
  47. {
  48. return [
  49. [['store_id', 'form_name', 'dividend_day', 'first_commission','second_commission','third_commission'], 'required'],
  50. [['store_id', 'first_commission', 'second_commission', 'third_commission', 'updated_at'], 'safe'],
  51. [['store_id', 'dividend_day', 'auto_send_day', 'is_auto_send', 'is_share_self'], 'integer'],
  52. [['form_name'], 'string'],
  53. ];
  54. }
  55. /**
  56. * {@inheritdoc}
  57. */
  58. public function attributeLabels()
  59. {
  60. return [
  61. 'id' => 'ID',
  62. 'store_id' => 'Store ID',
  63. 'dividend_day' => '分红周期',
  64. 'auto_send_day' => '自动发放时间',
  65. 'first_commission' => '一级分销',
  66. 'second_commission' => '二级分销',
  67. 'third_commission' => '三级分销',
  68. 'is_auto_send' => '是否自动发放',
  69. 'is_share_self' => '是否分销内购',
  70. 'form_name' => '表单名称',
  71. 'updated_at' => '是否删除',
  72. ];
  73. }
  74. }