OrderGoodsDec.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%ORDER_GOODS_DEC}}".
  6. *
  7. * @property string $ID
  8. * @property string $ORDER_SN 订单ID
  9. * @property string $GOODS_TITLE 商品名称
  10. * @property string $PRICE 价格
  11. * @property string $REAL_PRICE 实际价格
  12. * @property string $PV 订货PV
  13. * @property string $REAL_PV 实际PV
  14. * @property string $POINT 兑换积分
  15. * @property int $PERIOD_NUM 期数
  16. * @property int $ORDER_DAY 日期
  17. * @property string $SKU_CODE 商品编码
  18. * @property int $BUY_NUMS 购买数量
  19. * @property string $P_CALC_MONTH 分区日期
  20. */
  21. class OrderGoodsDec extends \common\components\ActiveRecord
  22. {
  23. /**
  24. * {@inheritdoc}
  25. */
  26. public static function tableName()
  27. {
  28. return '{{%ORDER_GOODS_DEC}}';
  29. }
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public function rules()
  34. {
  35. return [
  36. [['ORDER_SN', 'GOODS_TITLE', 'SKU_CODE'], 'required'],
  37. [['PRICE', 'REAL_PRICE', 'PV', 'REAL_PV', 'POINT'], 'number'],
  38. [['BUY_NUMS', 'PERIOD_NUM'], 'integer'],
  39. [['ID', 'ORDER_SN'], 'string', 'max' => 32],
  40. [['GOODS_TITLE'], 'string', 'max' => 255],
  41. [['SKU_CODE','ORDER_DAY'], 'string', 'max' => 16],
  42. [['ID'], 'unique'],
  43. ];
  44. }
  45. /**
  46. * {@inheritdoc}
  47. */
  48. public function attributeLabels()
  49. {
  50. return [
  51. 'ID' => 'ID',
  52. 'ORDER_SN' => '订单ID',
  53. 'GOODS_TITLE' => '商品名称',
  54. 'PRICE' => '价格',
  55. 'REAL_PRICE' => '实际价格',
  56. 'PV' => '订货BV',
  57. 'REAL_PV' => '实际BV',
  58. 'POINT' => '兑换积分',
  59. 'PERIOD_NUM' => '期数',
  60. 'ORDER_DAY' => '日期',
  61. 'SKU_CODE' => '商品编码',
  62. 'BUY_NUMS' => '购买数量',
  63. 'P_CALC_MONTH' => '分区日期',
  64. ];
  65. }
  66. }