Lg.php 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. namespace app\models;
  8. use app\jobs\SyncMdGoodsJob;
  9. use yii\db\ActiveRecord;
  10. use yii\behaviors\TimestampBehavior;
  11. use Yii;
  12. class Lg extends \yii\db\ActiveRecord
  13. {
  14. /**
  15. * @inheritdoc
  16. */
  17. public static function tableName()
  18. {
  19. return '{{%lg}}';
  20. }
  21. public function behaviors()
  22. {
  23. return [
  24. [
  25. 'class' => TimestampBehavior::class,
  26. 'attributes' => [
  27. ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'],
  28. ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at']
  29. ]
  30. ]
  31. ];
  32. }
  33. const IS_DELETE_YES = 1;//已删除
  34. const IS_DELETE_NO = 0;//未删除
  35. const AUDIT_YES = 1;// 审核通过
  36. const AUDIT_NO = 2;// 审核拒绝
  37. const AUDIT_WAIT = 0;// 等待审核
  38. /**
  39. * @inheritdoc
  40. */
  41. public function rules()
  42. {
  43. return [
  44. [['audit_time', 'store_id', 'is_delete', 'user_id', 'status', 'updated_at'], 'integer'],
  45. [['name', 'mobile', 'refuse_desc','bank_phone','cert_card','park_codes','acc_no','bank_code','id_card_front','id_card_back','alipay_acc','bank_pic'], 'string'],
  46. [['id_card_start'], 'number'],
  47. [['name', 'mobile', 'refuse_desc','bank_phone','cert_card','park_codes','acc_no','bank_code','id_card_front','id_card_back','alipay_acc','bank_pic','id_card_end'], 'string', 'max' => 255],
  48. [['created_at'], 'safe']
  49. ];
  50. }
  51. /**
  52. * @inheritdoc
  53. */
  54. public function attributeLabels()
  55. {
  56. return [
  57. 'id' => 'ID',
  58. 'store_id' => 'Store ID',
  59. 'user_id' => '用户id',
  60. 'name' => 'Name',
  61. 'mobile' => 'Mobile',
  62. 'is_delete' => 'Is Delete',
  63. 'created_at' => '添加时间',
  64. 'status' => '审核状态(-1未通过,0待审核,1通过)',
  65. 'refuse_desc' => '拒接原因',
  66. ];
  67. }
  68. }