OrderStandardGoods.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%ORDER_STANDARD_GOODS}}".
  6. *
  7. * @property string $ID
  8. * @property string $ORDER_SN
  9. * @property string $GOODS_TITLE
  10. * @property string $PRICE
  11. * @property string $REAL_PRICE
  12. * @property string $PV
  13. * @property string $REAL_PV
  14. * @property string $SKU_CODE
  15. * @property int $BUY_NUMS
  16. * @property int $POINT
  17. * @property int $PERIOD_NUM
  18. * @property int $CALC_MONTH 结算月
  19. * @property string $PAY_TYPE
  20. */
  21. class OrderStandardGoods extends \common\components\ActiveRecord
  22. {
  23. /**
  24. * {@inheritdoc}
  25. */
  26. public static function tableName()
  27. {
  28. return '{{%ORDER_STANDARD_GOODS}}';
  29. }
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public function rules()
  34. {
  35. return [
  36. [['ID', 'ORDER_SN', 'GOODS_TITLE', 'SKU_CODE', 'CALC_MONTH'], 'required'],
  37. [['PRICE', 'REAL_PRICE', 'PV', 'REAL_PV'], 'number'],
  38. [['BUY_NUMS', 'POINT', 'PERIOD_NUM', 'CALC_MONTH'], 'integer'],
  39. [['ID', 'ORDER_SN', 'PAY_TYPE'], 'string', 'max' => 32],
  40. [['GOODS_TITLE'], 'string', 'max' => 255],
  41. [['SKU_CODE'], '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' => 'Order Sn',
  53. 'GOODS_TITLE' => 'Goods Title',
  54. 'PRICE' => 'Price',
  55. 'REAL_PRICE' => 'Real Price',
  56. 'PV' => 'Bv',
  57. 'REAL_PV' => 'Real Bv',
  58. 'SKU_CODE' => 'Sku Code',
  59. 'BUY_NUMS' => 'Buy Nums',
  60. 'POINT' => 'Point',
  61. 'PERIOD_NUM' => 'Period Num',
  62. 'CALC_MONTH' => '结算月',
  63. 'PAY_TYPE' => 'Pay Type',
  64. ];
  65. }
  66. }