CalcBonusQY.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%CALC_BONUS_QY}}".
  6. *
  7. * @property string $ID
  8. * @property string $USER_ID 会员ID
  9. * @property string $LAST_DEC_LV 结算时会员级别
  10. * @property string $LAST_EMP_LV 结算时会员聘级
  11. * @property int $LAST_STATUS 结算时状态
  12. * @property string $AMOUNT 金额
  13. * @property int $PERIOD_NUM 结算期数
  14. * @property int $CALC_MONTH 所在结算月
  15. * @property int $CALCULATED_AT 结算时间
  16. * @property int $CREATED_AT 创建时间
  17. * @property string $LOGS 日志
  18. * @property $ORI_BONUS 原奖金
  19. * @property $RECONSUME_POINTS 重复消费积分
  20. * @property $MANAGE_TAX 管理费
  21. */
  22. class CalcBonusQY extends \common\components\ActiveRecord
  23. {
  24. /**
  25. * @inheritdoc
  26. */
  27. public static function tableName()
  28. {
  29. return '{{%CALC_BONUS_QY}}';
  30. }
  31. /**
  32. * @inheritdoc
  33. */
  34. public function rules()
  35. {
  36. return [
  37. [['USER_ID', 'PERIOD_NUM', 'CALC_MONTH', 'CALCULATED_AT', 'CREATED_AT'], 'required'],
  38. [['AMOUNT', 'ORI_BONUS', 'RECONSUME_POINTS', 'MANAGE_TAX'], 'number'],
  39. [['LAST_STATUS', 'PERIOD_NUM', 'CALC_MONTH', 'CALCULATED_AT', 'CREATED_AT'], 'integer'],
  40. [['ID', 'USER_ID', 'LAST_DEC_LV', 'LAST_EMP_LV', 'LAST_CROWN_LV'], 'string', 'max' => 32],
  41. [['LOGS'], 'string', 'max' => 2000],
  42. [['ID'], 'unique'],
  43. ];
  44. }
  45. /**
  46. * @inheritdoc
  47. */
  48. public function attributeLabels()
  49. {
  50. return [
  51. 'ID' => 'ID',
  52. 'USER_ID' => '会员ID',
  53. 'LAST_DEC_LV' => '结算时会员级别',
  54. 'LAST_EMP_LV' => '结算时会员聘级',
  55. 'LAST_CROWN_LV' => '结算时会员星级',
  56. 'LAST_STATUS' => '结算时状态',
  57. 'AMOUNT' => '金额',
  58. 'PERIOD_NUM' => '结算期数',
  59. 'CALC_MONTH' => '所在结算月',
  60. 'CALCULATED_AT' => '结算时间',
  61. 'CREATED_AT' => '创建时间',
  62. 'LOGS' => '日志',
  63. 'ORI_BONUS' => '原奖金',
  64. 'RECONSUME_POINTS' => '重复消费积分',
  65. 'MANAGE_TAX' => '管理费',
  66. ];
  67. }
  68. public function getStarCrown()
  69. {
  70. return $this->hasOne(StarCrownLevel::class, ['ID' => 'LAST_CROWN_LV']);
  71. }
  72. }