Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
service
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
aimeiyue
service
Commits
918ea202
Commit
918ea202
authored
Oct 18, 2024
by
lizhilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
be61d854
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
88 deletions
+0
-88
app/Models/Advantage.php
+0
-58
app/Models/CheckNumber.php
+0
-13
app/Models/StoreAdminUsers.php
+0
-4
app/Models/Verifier.php
+0
-13
No files found.
app/Models/Advantage.php
deleted
100644 → 0
View file @
be61d854
<?php
namespace
App\Models
;
use
Dcat\Admin\Traits\HasDateTimeFormatter
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
use
Illuminate\Database\Eloquent\Model
;
class
Advantage
extends
Model
{
use
HasDateTimeFormatter
;
use
SoftDeletes
;
protected
$table
=
'advantage'
;
protected
$fillable
=
[
'cate_1'
,
'cate_2'
,
'cate_3'
,
'cate_4'
,
'characteristic '
,
'brand_level'
,
'brand_id'
,
'company'
,
'goods'
,
'contacts'
];
public
static
function
getTableName
()
{
return
with
(
new
static
)
->
getTable
();
}
public
function
brand
(){
return
$this
->
belongsTo
(
Brand
::
class
,
'brand_id'
,
'id'
);
}
public
function
brand_level_model
(){
return
$this
->
belongsTo
(
BrandLevel
::
class
,
'brand_level'
,
'id'
);
}
public
static
function
CreateImportData
(
$item
)
:
array
{
$cate_1_id
=
Category
::
getIdForNameAndParentId
(
trim
(
$item
[
1
]),
0
);
$cate_2_id
=
Category
::
getIdForNameAndParentId
(
trim
(
$item
[
2
]),
$cate_1_id
);
$cate_3_id
=
Category
::
getIdForNameAndParentId
(
trim
(
$item
[
3
]),
$cate_2_id
);
$cate_4_id
=
Category
::
getIdForNameAndParentId
(
trim
(
$item
[
4
]),
$cate_3_id
);
$brand_level
=
BrandLevel
::
firstOrCreate
([
'title'
=>
trim
(
$item
[
6
])])
->
id
;
$brand_id
=
Brand
::
firstOrCreate
([
'title'
=>
trim
(
$item
[
7
])])
->
id
;
return
[
'cate_1'
=>
$cate_1_id
,
'cate_2'
=>
$cate_2_id
,
'cate_3'
=>
$cate_3_id
,
'cate_4'
=>
$cate_4_id
,
'characteristic'
=>
trim
(
$item
[
5
]),
'brand_level'
=>
$brand_level
,
'brand_id'
=>
$brand_id
,
'company'
=>
trim
(
$item
[
8
]),
'goods'
=>
trim
(
$item
[
9
]),
'contacts'
=>
trim
(
$item
[
10
]),
'created_at'
=>
date
(
'Y-m-d H:i:s'
),
'updated_at'
=>
date
(
'Y-m-d H:i:s'
),
];
}
}
app/Models/CheckNumber.php
deleted
100644 → 0
View file @
be61d854
<?php
namespace
App\Models
;
use
Dcat\Admin\Traits\HasDateTimeFormatter
;
use
Illuminate\Database\Eloquent\Model
;
class
CheckNumber
extends
Model
{
use
HasDateTimeFormatter
;
protected
$table
=
'li_check_number'
;
}
app/Models/StoreAdminUsers.php
View file @
918ea202
...
...
@@ -17,10 +17,6 @@ class StoreAdminUsers extends Authenticatable
use
HasApiTokens
,
HasFactory
,
Notifiable
;
protected
$table
=
'store_admin_users'
;
public
function
verifier
()
{
//return $this->belongsTo(Verifier::class, 'store_admin_users_id');
}
public
function
merchant
()
{
...
...
app/Models/Verifier.php
deleted
100644 → 0
View file @
be61d854
<?php
namespace
App\Models
;
use
Dcat\Admin\Traits\HasDateTimeFormatter
;
use
Illuminate\Database\Eloquent\Model
;
class
Verifier
extends
Model
{
use
HasDateTimeFormatter
;
protected
$table
=
'verifier'
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment