UserPeriodPoints.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%USER_PERIOD_POINTS}}".
  6. *
  7. * @property string $ID
  8. * @property string $USER_ID 会员ID
  9. * @property int $PERIOD_NUM 报单期数
  10. * @property string $RECONSUME_POINTS 复消积分
  11. * @property string $REMAINDER_POINTS 剩余积分
  12. * @property int EXPIRED 是否过期
  13. * @property int EXPIRED_PERIOD 过期期数
  14. * @property int EXPIRED_AT 过期时间
  15. * @property int $CREATED_AT 创建时间
  16. */
  17. class UserPeriodPoints extends \common\components\ActiveRecord
  18. {
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public static function tableName()
  23. {
  24. return '{{%USER_PERIOD_POINTS}}';
  25. }
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function rules()
  30. {
  31. return [
  32. [['USER_ID', 'PERIOD_NUM', 'CREATED_AT'], 'required'],
  33. [['PERIOD_NUM', 'CREATED_AT', 'EXPIRED', 'EXPIRED_PERIOD', 'EXPIRED_AT'], 'integer'],
  34. [['RECONSUME_POINTS', 'REMAINDER_POINTS'], 'number'],
  35. [['ID', 'USER_ID'], 'string', 'max' => 32],
  36. ];
  37. }
  38. /**
  39. * {@inheritdoc}
  40. */
  41. public function attributeLabels()
  42. {
  43. return [
  44. 'ID' => 'ID',
  45. 'USER_ID' => '会员ID',
  46. 'RECONSUME_POINTS' => '复消积分',
  47. 'REMAINDER_POINTS' => '剩余积分',
  48. 'EXPIRED' => '是否过期',
  49. 'EXPIRED_PERIOD' => '过期期数',
  50. 'EXPIRED_AT' => '过期时间',
  51. 'CREATED_AT' => '创建时间',
  52. ];
  53. }
  54. }