AgentApply.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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_apply}}".
  13. *
  14. * @property integer $id
  15. * @property string $username
  16. * @property string $password
  17. * @property string $mobile
  18. * @property string $name
  19. * @property integer $saas_user_id
  20. * @property integer $province_id
  21. * @property integer $city_id
  22. * @property integer $district_id
  23. * @property integer $area_level
  24. * @property string $address
  25. * @property string $lat
  26. * @property string $lng
  27. * @property integer $agent_type
  28. * @property integer $status
  29. * @property integer $is_delete
  30. * @property integer $admin_id
  31. * @property string $reason
  32. */
  33. class AgentApply extends \yii\db\ActiveRecord
  34. {
  35. /**
  36. * @inheritdoc
  37. */
  38. public static function tableName()
  39. {
  40. return '{{%agent_apply}}';
  41. }
  42. public function behaviors()
  43. {
  44. return [
  45. [
  46. 'class' => TimestampBehavior::class,
  47. 'attributes' => [
  48. ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
  49. ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
  50. ]
  51. ]
  52. ];
  53. }
  54. /**
  55. * @inheritdoc
  56. */
  57. public function rules()
  58. {
  59. return [
  60. [["id", "saas_user_id", "province_id", "city_id", "district_id", "agent_type", "status", "is_delete", "admin_id", "area_level"], 'integer'],
  61. [["username", "password", "mobile", "name", "address", "lat", "lng", "reason"], 'string']
  62. ];
  63. }
  64. }