ScoreMonth.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%SCORE_MONTH}}".
  6. *
  7. * @property string $ID ID
  8. * @property string $USER_ID 会员ID
  9. * @property string $BASE_SCORE 基础分数
  10. * @property string $LEVEL_SCORE 级别分数
  11. * @property string $UPGRADE_SCORE 升级分数
  12. * @property string $TOTAL_SCORE 总分数
  13. * @property int $PERIOD_NUM 期数
  14. * @property int $CALC_MONTH 结算月
  15. * @property int $CREATED_AT 创建时间
  16. */
  17. class ScoreMonth extends \common\components\ActiveRecord
  18. {
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public static function tableName()
  23. {
  24. return '{{%SCORE_MONTH}}';
  25. }
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function rules()
  30. {
  31. return [
  32. [['ID', 'USER_ID', 'CALC_MONTH', 'CREATED_AT'], 'required'],
  33. [['BASE_SCORE', 'LEVEL_SCORE', 'UPGRADE_SCORE', 'TOTAL_SCORE'], 'number'],
  34. [['PERIOD_NUM', 'CALC_MONTH', 'CREATED_AT'], 'integer'],
  35. [['ID', 'USER_ID'], 'string', 'max' => 32],
  36. [['ID'], 'unique'],
  37. ];
  38. }
  39. /**
  40. * {@inheritdoc}
  41. */
  42. public function attributeLabels()
  43. {
  44. return [
  45. 'ID' => 'ID',
  46. 'USER_ID' => '会员ID',
  47. 'BASE_SCORE' => '基础分数',
  48. 'LEVEL_SCORE' => '级别分数',
  49. 'UPGRADE_SCORE' => '升级分数',
  50. 'TOTAL_SCORE' => '总分数',
  51. 'PERIOD_NUM' => '期数',
  52. 'CALC_MONTH' => '结算月',
  53. 'CREATED_AT' => '创建时间',
  54. ];
  55. }
  56. }