AgentGoodsInstallLog.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use Yii;
  9. use yii\behaviors\TimestampBehavior;
  10. use yii\db\ActiveRecord;
  11. /**
  12. * This is the model class for table "{{%agent_goods_install_log}}".
  13. *
  14. * @property integer $id
  15. * @property integer $goods_agent_admin_id
  16. * @property integer $order_detail_id
  17. * @property integer $order_id
  18. * @property integer $created_at
  19. * @property integer $updated_at
  20. * @property integer $status
  21. * @property integer $is_need_install
  22. * @property integer $order_type
  23. */
  24. class AgentGoodsInstallLog extends \yii\db\ActiveRecord
  25. {
  26. const ORDER_TYPE_NORMAL = 0;
  27. const ORDER_TYPE_PURCHASE = 1;
  28. /**
  29. * @inheritdoc
  30. */
  31. public static function tableName()
  32. {
  33. return '{{%agent_goods_install_log}}';
  34. }
  35. public function behaviors()
  36. {
  37. return [
  38. [
  39. 'class' => TimestampBehavior::class,
  40. 'attributes' => [
  41. ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
  42. ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
  43. ]
  44. ]
  45. ];
  46. }
  47. /**
  48. * @inheritdoc
  49. */
  50. public function rules()
  51. {
  52. return [
  53. [['id', 'goods_agent_admin_id', 'order_detail_id', 'created_at', 'updated_at', 'status', 'is_need_install', 'order_id', 'order_type'], 'integer']
  54. ];
  55. }
  56. }