AmpPeriod.php 976 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace common\models;
  3. /**
  4. * This is the model class for table "{{%AMP_PERIOD}}".
  5. *
  6. * @property string ID
  7. * @property string USER_ID 用户ID
  8. * @property string ORDER_SN 订单号
  9. * @property int PERIOD_NUM 周期
  10. * @property double BV BV
  11. */
  12. class AmpPeriod extends \common\components\ActiveRecord
  13. {
  14. /**
  15. * @inheritdoc
  16. */
  17. public static function tableName()
  18. {
  19. return '{{%AMP_PERIOD}}';
  20. }
  21. /**
  22. * @inheritdoc
  23. */
  24. public function rules()
  25. {
  26. return [
  27. [['USER_ID', 'ORDER_SN', 'PERIOD_NUM', 'BV'], 'required'],
  28. [['PERIOD_NUM', 'BV'], 'number'],
  29. [['ID'], 'unique'],
  30. ];
  31. }
  32. /**
  33. * @inheritdoc
  34. */
  35. public function attributeLabels()
  36. {
  37. return [
  38. 'ID' => 'ID',
  39. 'USER_ID' => '用户ID',
  40. 'ORDER_SN' => '订单号',
  41. 'PERIOD_NUM' => '周期',
  42. 'BV' => 'BV',
  43. ];
  44. }
  45. }