StoreDividends.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. namespace app\models;
  3. use yii\behaviors\TimestampBehavior;
  4. use yii\db\ActiveRecord;/**
  5. * This is the model class for table "{{%store_dividends}}".
  6. *
  7. * @property integer $id
  8. * @property integer $max_cycle
  9. * @property integer $current_cycle
  10. * @property float $dividends_money
  11. * @property float $league_price
  12. * @property integer $is_finish
  13. * @property string $created_at
  14. * @property string $updated_at
  15. */
  16. class StoreDividends extends \yii\db\ActiveRecord
  17. {
  18. /**
  19. * 是否完成:否;
  20. */
  21. const IS_FINISH_NO = 0;
  22. /**
  23. * 是否完成:是;
  24. */
  25. const IS_FINISH_YES = 1;
  26. /**
  27. * @inheritdoc
  28. */
  29. public static function tableName()
  30. {
  31. return '{{%store_dividends}}';
  32. }
  33. public function rules()
  34. {
  35. return [
  36. [['id', 'max_cycle', 'current_cycle', 'is_finish'], 'integer'],
  37. [['dividends_money', 'league_price', 'created_at', 'updated_at'], 'number']
  38. ];
  39. }
  40. public function behaviors()
  41. {
  42. return [
  43. [
  44. 'class' => TimestampBehavior::class
  45. ]
  46. ];
  47. }
  48. public function attributeLabels()
  49. {
  50. return [
  51. 'id' => '',
  52. 'max_cycle' => '最大分红周期',
  53. 'current_cycle' => '当前分红周期数',
  54. 'dividends_money' => '当前分红统计金额(订单金额*让利)',
  55. 'league_price' => '累计发放联盟券数量',
  56. 'is_finish' => '是否完成',
  57. 'created_at' => '创建时间',
  58. 'updated_at' => '修改时间'
  59. ];
  60. }
  61. }