CalcBonusTourism.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%CALC_BONUS_TOURISM}}".
  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_YEAR 所在结算年
  15. * @property int $CALC_MONTH 所在结算月
  16. * @property string $P_CALC_MONTH 表分区的日期索引
  17. * @property string $LOGS 日志
  18. * @property int $CREATED_AT 创建时间
  19. */
  20. class CalcBonusTourism extends \common\components\ActiveRecord
  21. {
  22. /**
  23. * @inheritdoc
  24. */
  25. public static function tableName()
  26. {
  27. return '{{%CALC_BONUS_TOURISM}}';
  28. }
  29. /**
  30. * @inheritdoc
  31. */
  32. public function rules()
  33. {
  34. return [
  35. [['USER_ID', 'PERIOD_NUM', 'CALC_YEAR', 'CALC_MONTH', 'P_CALC_MONTH', 'CREATED_AT'], 'required'],
  36. [['AMOUNT'], 'number'],
  37. [['LAST_STATUS', 'PERIOD_NUM', 'CALC_YEAR', 'CALC_MONTH', 'CREATED_AT'], 'integer'],
  38. [['ID', 'USER_ID', 'LAST_DEC_LV', 'BONUS_TYPE'], 'string', 'max' => 32],
  39. [['P_CALC_MONTH'], 'safe'],
  40. [['LOGS'], 'string', 'max' => 2000],
  41. [['ID'], 'unique'],
  42. ];
  43. }
  44. /**
  45. * @inheritdoc
  46. */
  47. public function attributeLabels()
  48. {
  49. return [
  50. 'ID' => 'ID',
  51. 'USER_ID' => '会员ID',
  52. 'LAST_DEC_LV' => '结算时会员级别',
  53. 'LAST_EMP_LV' => '结算时会员聘级',
  54. 'LAST_STATUS' => '结算时状态',
  55. 'AMOUNT' => '奖金金额',
  56. 'PERIOD_NUM' => '结算期数',
  57. 'CALC_YEAR' => '所在结算年',
  58. 'CALC_MONTH' => '所在结算月',
  59. 'P_CALC_MONTH' => '表分区的日期索引',
  60. 'CREATED_AT' => '创建时间',
  61. 'LOGS' => '日志',
  62. ];
  63. }
  64. }