|
@@ -3,15 +3,17 @@
|
|
|
namespace app\model\saas;
|
|
namespace app\model\saas;
|
|
|
|
|
|
|
|
use app\extra\basic\Model;
|
|
use app\extra\basic\Model;
|
|
|
|
|
+use app\model\system\SystemUser;
|
|
|
|
|
+use think\model\relation\HasOne;
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * @property integer $id (主键)
|
|
|
|
|
- * @property mixed $openid
|
|
|
|
|
- * @property integer $service_id
|
|
|
|
|
- * @property string $content
|
|
|
|
|
- * @property string $type
|
|
|
|
|
- * @property integer $status 1已读
|
|
|
|
|
|
|
+ * @property integer $id (主键)
|
|
|
|
|
+ * @property mixed $openid
|
|
|
|
|
+ * @property integer $service_id
|
|
|
|
|
+ * @property string $content
|
|
|
|
|
+ * @property string $type
|
|
|
|
|
+ * @property integer $status 1已读
|
|
|
* @property mixed $create_at
|
|
* @property mixed $create_at
|
|
|
*/
|
|
*/
|
|
|
class SaasChatMsg extends Model
|
|
class SaasChatMsg extends Model
|
|
@@ -44,5 +46,14 @@ class SaasChatMsg extends Model
|
|
|
*/
|
|
*/
|
|
|
public bool $timestamps = false;
|
|
public bool $timestamps = false;
|
|
|
|
|
|
|
|
|
|
+ public function nick(): HasOne
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->hasOne(SystemUser::class,"id","service_id");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public function user(): HasOne
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->hasOne(SaasUserOpen::class,"openid","openid");
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
}
|
|
}
|