OrderGoodsShop.php 1.8 KB

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