OrderGoods.php 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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_ID 商品ID
  10. * @property string $GOODS_TITLE 商品名称
  11. * @property string $PRICE 价格
  12. * @property string $REAL_PRICE 实际价格
  13. * @property string $PV 订货PV
  14. * @property string $REAL_PV 实际PV
  15. * @property string $POINT 兑换积分
  16. * @property string $SKU_CODE 商品编码
  17. * @property int $BUY_NUMS 购买数量
  18. * @property string $P_CALC_MONTH 分区日期
  19. * @property int CATEGORY_TYPE 商品分类
  20. * @property int PAY_TYPE 支付方式
  21. */
  22. class OrderGoods extends \common\components\ActiveRecord
  23. {
  24. /**
  25. * {@inheritdoc}
  26. */
  27. public static function tableName()
  28. {
  29. return '{{%ORDER_GOODS}}';
  30. }
  31. /**
  32. * {@inheritdoc}
  33. */
  34. public function rules()
  35. {
  36. return [
  37. [['ORDER_SN', 'GOODS_ID', 'GOODS_TITLE', 'SKU_CODE', 'CATEGORY_TYPE', 'PAY_TYPE'], 'required'],
  38. [['PRICE', 'REAL_PRICE', 'PV', 'REAL_PV', 'POINT', 'CATEGORY_TYPE', 'PAY_TYPE'], 'number'],
  39. [['BUY_NUMS'], 'integer'],
  40. [['ID', 'ORDER_SN', 'GOODS_ID'], 'string', 'max' => 32],
  41. [['GOODS_TITLE'], 'string', 'max' => 255],
  42. [['SKU_CODE'], 'string', 'max' => 16],
  43. [['ID'], 'unique'],
  44. ];
  45. }
  46. /**
  47. * {@inheritdoc}
  48. */
  49. public function attributeLabels()
  50. {
  51. return [
  52. 'ID' => 'ID',
  53. 'ORDER_SN' => '订单ID',
  54. 'GOODS_ID' => '商品ID',
  55. 'GOODS_TITLE' => '商品名称',
  56. 'PRICE' => '价格',
  57. 'REAL_PRICE' => '实际价格',
  58. 'PV' => '订货PV',
  59. 'REAL_PV' => '实际PV',
  60. 'POINT' => '兑换积分',
  61. 'SKU_CODE' => '商品编码',
  62. 'BUY_NUMS' => '购买数量',
  63. 'P_CALC_MONTH' => '分区日期',
  64. 'CATEGORY_TYPE' => '商品分类',
  65. 'PAY_TYPE' => '支付方式',
  66. ];
  67. }
  68. }