VerifyCardLog.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. /**
  10. * This is the model class for table "{{%verify_card_log}}".
  11. *
  12. * @property int $id
  13. * @property int $store_id
  14. * @property int $sale_id 核销卡售卖id
  15. * @property int $shop_id 核销自提点
  16. * @property int $verify_person 核销人员
  17. * @property int $use_time 核销时间
  18. * @property int $is_delete
  19. * @property int $give_time 转赠时间
  20. * @property int $user_id 转赠人id
  21. * @property int recv_id 接收人id
  22. * @property int type 核销类型:1=核销,2=兑换,3=转赠
  23. * @property int received_time 接收时间
  24. * @property string describe 描述
  25. */
  26. class VerifyCardLog extends \yii\db\ActiveRecord
  27. {
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public static function tableName()
  32. {
  33. return '{{%verify_card_log}}';
  34. }
  35. const IS_DELETE_YES = 1;//已删除
  36. const IS_DELETE_NO = 0;//未删除
  37. const WRITE_TYPE_WRITE_OFF = 1; //核销
  38. const WRITE_TYPE_EXCHANGE = 2; //兑换
  39. const WRITE_TYPE_GIVE = 3; //赠送
  40. /**
  41. * {@inheritdoc}
  42. */
  43. public function rules()
  44. {
  45. return [
  46. [['store_id', 'sale_id', 'shop_id', 'verify_person', 'use_time', 'is_delete', 'user_id', 'recv_id', 'type', 'received_time'], 'integer'],
  47. ['describe', 'string'],
  48. ];
  49. }
  50. /**
  51. * {@inheritdoc}
  52. */
  53. public function attributeLabels()
  54. {
  55. return [
  56. 'id' => 'ID',
  57. 'store_id' => 'Store ID',
  58. 'sale_id' => '核销卡售卖id',
  59. 'shop_id' => '核销自提点',
  60. 'verify_person' => '核销人员',
  61. 'use_time' => '核销时间',
  62. 'is_delete' => '状态',
  63. 'give_time' => '转赠时间',
  64. 'user_id' => '转赠人id',
  65. 'recv_id' => '接收人id',
  66. 'type' => '核销类型:1=核销,2=兑换,3=转赠',
  67. 'received_time' => '领取时间',
  68. 'describe' => '描述',
  69. ];
  70. }
  71. /**
  72. * {@inheritdoc}
  73. * @return VerifyCardQuery the active query used by this AR class.
  74. */
  75. // public static function find()
  76. // {
  77. // return new VerifyCardQuery(get_called_class());
  78. // }
  79. }