AgentFrontCentralizeGoodsLog.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. namespace app\models;
  3. use yii\behaviors\TimestampBehavior;
  4. use yii\db\ActiveRecord;
  5. /**
  6. * This is the model class for table "{{%agent_front_centralize_goods_log}}".
  7. *
  8. * @property integer $id
  9. * @property integer $centralize_goods_id
  10. * @property integer $cloud_order_id
  11. * @property integer $md_id
  12. * @property integer $created_at
  13. * @property integer $updated_at
  14. */
  15. class AgentFrontCentralizeGoodsLog extends \yii\db\ActiveRecord
  16. {
  17. /**
  18. * @inheritdoc
  19. */
  20. public static function tableName()
  21. {
  22. return '{{%agent_front_centralize_goods_log}}';
  23. }
  24. public function behaviors()
  25. {
  26. return [
  27. [
  28. 'class' => TimestampBehavior::class,
  29. 'attributes' => [
  30. ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
  31. ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
  32. ]
  33. ]
  34. ];
  35. }
  36. /**
  37. * @inheritdoc
  38. */
  39. public function rules()
  40. {
  41. return [
  42. [['id', 'centralize_goods_id', 'cloud_order_id', 'created_at', 'updated_at', 'md_id'], 'integer']
  43. ];
  44. }
  45. public function attributeLabels()
  46. {
  47. return [
  48. 'id' => '',
  49. 'centralize_goods_id' => '集采商品表ID',
  50. 'md_id' => '门店ID',
  51. 'created_at' => '',
  52. 'updated_at' => ''
  53. ];
  54. }
  55. }