MobileFollowLog.php 630 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace app\common\model;
  3. use think\Model;
  4. class MobileFollowLog extends Model
  5. {
  6. // 设置字段信息
  7. protected $schema = [
  8. 'id' => 'int',
  9. 'follow_id' => 'int',
  10. 'type' => 'int',
  11. 'remark' => 'string',
  12. 'createtime' => 'int',
  13. ];
  14. // 设置字段自动转换类型
  15. protected $type = [
  16. 'createtime' => 'timestamp:Y-m-d H:i:s',
  17. ];
  18. public static $typeText = [1 => '电话跟进', 2 => '微信跟进', 3 => '面谈'];
  19. public function getTypeTextAttr($value, $data)
  20. {
  21. return self::$typeText[$data['type']];
  22. }
  23. }