Insurance.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use yii\db\ActiveRecord;
  9. use yii\behaviors\TimestampBehavior;
  10. /**
  11. * This is the model class for table "{{%insurance}}".
  12. *
  13. * @property int $id
  14. * @property int $store_id
  15. * @property string $name 姓名
  16. * @property string $phone 手机号
  17. * @property string $address 地址
  18. * @property string $date 服务时间
  19. * @property string $serve 服务项目
  20. * @property string $price 服务金额
  21. * @property string $serve_man 服务人员
  22. * @property string $insurance 保单信息
  23. * @property string $report 报告
  24. * @property string $search_num 剩余查询次数
  25. * @property int $is_delete 是否删除:0=否;1=是;
  26. * @property int $created_at 添加时间
  27. * @property int $updated_at 更新时间
  28. * @property string $live_room_url 绑定直播间地址
  29. */
  30. class Insurance extends \yii\db\ActiveRecord
  31. {
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public static function tableName()
  36. {
  37. return '{{%insurance}}';
  38. }
  39. public function behaviors()
  40. {
  41. return [
  42. [
  43. 'class' => TimestampBehavior::class,
  44. 'attributes' => [
  45. ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
  46. ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
  47. ]
  48. ]
  49. ];
  50. }
  51. /**
  52. * {@inheritdoc}
  53. */
  54. public function rules()
  55. {
  56. return [
  57. [['store_id', 'name'], 'required'],
  58. [['store_id','updated_at', 'created_at', 'is_delete', ], 'integer'],
  59. [['name', 'phone', 'address', 'date', 'serve', 'price', 'serve_man', 'insurance', 'report', 'search_num'], 'string', 'max' => 255],
  60. [['live_room_url'], 'string'],
  61. ];
  62. }
  63. /**
  64. * {@inheritdoc}
  65. */
  66. public function attributeLabels()
  67. {
  68. return [
  69. 'id' => 'ID',
  70. 'store_id' => 'Store ID',
  71. 'name' => '名称',
  72. 'phone' => '手机号',
  73. 'address' => '地址',
  74. 'date' => '服务时间',
  75. 'serve' => '服务项目',
  76. 'price' => '服务金额',
  77. 'serve_man' => '服务人员',
  78. 'insurance' => '保单信息',
  79. 'report' => '报告',
  80. 'search_num' => '剩余查询次数',
  81. 'is_delete' => '是否删除:0=否;1=是;',
  82. 'created_at' => '添加时间',
  83. 'updated_at' => 'Update Time',
  84. 'live_room_url' => '绑定直播间地址'
  85. ];
  86. }
  87. }