Sender.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. /**
  11. * This is the model class for table "{{%sender}}".
  12. *
  13. * @property integer $id
  14. * @property integer $store_id
  15. * @property string $company
  16. * @property string $name
  17. * @property string $tel
  18. * @property string $mobile
  19. * @property string $post_code
  20. * @property string $province
  21. * @property string $city
  22. * @property string $exp_area
  23. * @property string $address
  24. * @property integer $is_delete
  25. * @property integer $delivery_id
  26. * @property integer $created_at
  27. * @property integer $updated_at
  28. * @property integer $supplier_id
  29. */
  30. class Sender extends \yii\db\ActiveRecord
  31. {
  32. /**
  33. * @inheritdoc
  34. */
  35. public static function tableName()
  36. {
  37. return '{{%sender}}';
  38. }
  39. public function behaviors()
  40. {
  41. return [
  42. [
  43. // 自动更新创建和更新时间
  44. 'class' => TimestampBehavior::class,
  45. 'value' => time()
  46. ]
  47. ];
  48. }
  49. /**
  50. * @inheritdoc
  51. */
  52. public function rules()
  53. {
  54. return [
  55. [['store_id', 'is_delete', 'delivery_id', 'created_at', 'updated_at', 'supplier_id'], 'integer'],
  56. [['company', 'name', 'tel', 'mobile', 'post_code', 'province', 'city', 'exp_area', 'address'], 'string', 'max' => 255],
  57. ];
  58. }
  59. /**
  60. * @inheritdoc
  61. */
  62. public function attributeLabels()
  63. {
  64. return [
  65. 'id' => 'ID',
  66. 'store_id' => 'Store ID',
  67. 'company' => 'Company',
  68. 'name' => 'Name',
  69. 'tel' => 'Tel',
  70. 'mobile' => 'Mobile',
  71. 'post_code' => 'Post Code',
  72. 'province' => 'Province',
  73. 'city' => 'City',
  74. 'exp_area' => 'Exp Area',
  75. 'address' => 'Address',
  76. 'is_delete' => 'Is Delete',
  77. 'delivery_id' => 'Delivery ID',
  78. 'updated_at' => '更新时间',
  79. 'created_at' => '创建时间',
  80. 'supplier_id' => '供货商id'
  81. ];
  82. }
  83. }