Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Cong.Zhao
/
musician-api.hikoon.com
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
cca90f22
...
cca90f222a3f2203b98d6e78f9c8482a05f90070
authored
2022-11-29 18:58:14 +0800
by
lemon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
上传文件
1 parent
3bed3d31
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
app/Models/Legal/PropertyTrackFile.php
app/Models/Legal/PropertyTrackFileType.php
app/Services/PropertyTrackService.php
app/Models/Legal/PropertyTrackFile.php
View file @
cca90f2
...
...
@@ -11,7 +11,7 @@ class PropertyTrackFile extends BaseModel
protected
$guarded
=
[];
public
$hidden
=
[
'deleted_at'
,
'updated_at'
,
'from'
,
'id'
,
'pt_id'
'deleted_at'
,
'updated_at'
,
'from'
,
'id'
,
'pt_id'
,
'file_id'
,
];
/**
...
...
@@ -22,8 +22,19 @@ class PropertyTrackFile extends BaseModel
return
$this
->
belongsTo
(
PropertyTrack
::
class
,
'id'
,
'pft_id'
);
}
/**
* @return HasMany
*/
public
function
ptfTypes
()
:
HasMany
{
return
$this
->
hasMany
(
PropertyTrackFileType
::
class
,
'p_file_id'
,
'id'
);
}
/**
* @return BelongsTo
*/
public
function
file
()
{
return
$this
->
belongsTo
(
FileMap
::
class
,
'file_id'
);
}
}
...
...
app/Models/Legal/PropertyTrackFileType.php
View file @
cca90f2
...
...
@@ -10,7 +10,7 @@ class PropertyTrackFileType extends BaseModel
protected
$guarded
=
[];
protected
$hidden
=
[
'pt_id'
,
'p_file_id'
,
'p_type_id'
'pt_id'
,
'p_file_id'
,
'p_type_id'
,
'id'
,
];
/**
...
...
app/Services/PropertyTrackService.php
View file @
cca90f2
...
...
@@ -72,10 +72,8 @@ class PropertyTrackService extends Service
*/
public
function
file
()
{
$trackFiles
=
PropertyTrackFile
::
query
()
->
with
(
'ptfTypes.type:id,type_name,remark'
)
->
where
([
'pt_id'
=>
$this
->
request
->
input
(
'track_id'
)])
->
get
();
echo
$trackFiles
;
exit
();
$trackFiles
=
PropertyTrackFile
::
query
()
->
with
(
'ptfTypes.type:id,type_name,remark'
)
->
where
([
'pt_id'
=>
$this
->
request
->
input
(
'track_id'
)])
->
paginate
(
$this
->
pageSize
);
return
Response
::
success
(
$trackFiles
);
}
...
...
Please
register
or
sign in
to post a comment