CalcMonthBonusUser.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%CALC_MONTH_BONUS_USER}}".
  6. *
  7. * @property string $ID
  8. * @property string $USER_ID 用户ID
  9. * @property int $CALC_MONTH 结算月
  10. * @property int $CREATED_AT 创建时间
  11. */
  12. class CalcMonthBonusUser extends \common\components\ActiveRecord
  13. {
  14. /**
  15. * {@inheritdoc}
  16. */
  17. public static function tableName()
  18. {
  19. return '{{%CALC_MONTH_BONUS_USER}}';
  20. }
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public function rules()
  25. {
  26. return [
  27. [['ID', 'USER_ID', 'CALC_MONTH', 'CREATED_AT'], 'required'],
  28. [['CALC_MONTH', 'CREATED_AT'], 'integer'],
  29. [['ID', 'USER_ID'], 'string', 'max' => 32],
  30. [['CALC_MONTH', 'USER_ID'], 'unique', 'targetAttribute' => ['CALC_MONTH', 'USER_ID']],
  31. [['ID'], 'unique'],
  32. ];
  33. }
  34. /**
  35. * {@inheritdoc}
  36. */
  37. public function attributeLabels()
  38. {
  39. return [
  40. 'ID' => 'ID',
  41. 'USER_ID' => '用户ID',
  42. 'CALC_MONTH' => '结算月',
  43. 'CREATED_AT' => '创建时间',
  44. ];
  45. }
  46. }