Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
workbiu-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gxx
workbiu-admin
Commits
c1227d01
Commit
c1227d01
authored
Nov 30, 2017
by
gxx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加了一些database
parent
d336a6af
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
882 additions
and
10 deletions
+882
-10
AdminService.php
app/Services/AdminService.php
+1
-1
RoleService.php
app/Services/RoleService.php
+1
-1
SMSService.php
app/Services/SMSService.php
+4
-2
ScheduleService.php
app/Services/ScheduleService.php
+1
-1
StatisticsService.php
app/Services/StatisticsService.php
+3
-4
2017_09_06_064645_create_users_table.php
database/migrations/2017_09_06_064645_create_users_table.php
+41
-0
2017_09_06_065429_create_groups_table.php
...base/migrations/2017_09_06_065429_create_groups_table.php
+38
-0
2017_09_06_065755_create_user_groups_table.php
...migrations/2017_09_06_065755_create_user_groups_table.php
+35
-0
2017_09_06_070104_create_projects_table.php
...se/migrations/2017_09_06_070104_create_projects_table.php
+40
-0
2017_09_06_070533_create_tasks_table.php
database/migrations/2017_09_06_070533_create_tasks_table.php
+39
-0
2017_09_06_070859_create_notifications_table.php
...grations/2017_09_06_070859_create_notifications_table.php
+38
-0
2017_09_06_071134_create_user_projects_table.php
...grations/2017_09_06_071134_create_user_projects_table.php
+36
-0
2017_09_06_071718_create_schedules_table.php
...e/migrations/2017_09_06_071718_create_schedules_table.php
+37
-0
2017_09_06_072230_create_files_table.php
database/migrations/2017_09_06_072230_create_files_table.php
+39
-0
2017_09_06_073140_create_wechats_table.php
...ase/migrations/2017_09_06_073140_create_wechats_table.php
+37
-0
2017_09_06_073357_create_get_passwords_table.php
...grations/2017_09_06_073357_create_get_passwords_table.php
+34
-0
2017_09_06_073459_create_user_settings_table.php
...grations/2017_09_06_073459_create_user_settings_table.php
+35
-0
2017_09_07_032619_create_folders_table.php
...ase/migrations/2017_09_07_032619_create_folders_table.php
+36
-0
2017_09_07_071850_create_boards_table.php
...base/migrations/2017_09_07_071850_create_boards_table.php
+36
-0
2017_09_12_204651_create_sms_verifies_table.php
...igrations/2017_09_12_204651_create_sms_verifies_table.php
+37
-0
2017_09_13_163214_create_email_checks_table.php
...igrations/2017_09_13_163214_create_email_checks_table.php
+35
-0
2017_10_13_132720_create_invitations_table.php
...migrations/2017_10_13_132720_create_invitations_table.php
+38
-0
2017_10_19_131831_create_statuses_table.php
...se/migrations/2017_10_19_131831_create_statuses_table.php
+35
-0
2017_10_28_094448_create_default_pages_table.php
...grations/2017_10_28_094448_create_default_pages_table.php
+33
-0
2017_11_02_221732_create_notification_actions_table.php
...s/2017_11_02_221732_create_notification_actions_table.php
+39
-0
2017_11_13_093841_create_user_infos_table.php
.../migrations/2017_11_13_093841_create_user_infos_table.php
+38
-0
DatabaseSeeder.php
database/seeds/DatabaseSeeder.php
+1
-0
SmsTableSeeder.php
database/seeds/SmsTableSeeder.php
+94
-0
smsstatistics.blade.php
resources/views/admin/sms/smsstatistics.blade.php
+1
-1
No files found.
app/Services/AdminService.php
View file @
c1227d01
...
...
@@ -79,7 +79,7 @@ class AdminService implements AdminServiceContract
$admin
->
update
();
if
(
$admin
)
{
$roles
=
RoleAdmin
::
where
(
'admin_id'
,
$id
)
->
get
();
if
(
count
(
$role
)
>
0
)
{
if
(
$role
!=
null
)
{
if
(
!
$roles
->
isEmpty
())
{
foreach
(
$roles
as
$rol
)
{
$ro
=
RoleAdmin
::
where
([
'role_id'
=>
$rol
->
role_id
,])
->
first
();
...
...
app/Services/RoleService.php
View file @
c1227d01
...
...
@@ -23,7 +23,7 @@ class RoleService implements RoleServiceContract
$role
->
description
=
$description
;
$result
=
$role
->
save
();
if
(
$result
){
if
(
count
(
$permission
)
>
0
){
if
(
$permission
!=
null
){
$role
->
attachPermissions
(
$permission
);
}
return
$result
;
...
...
app/Services/SMSService.php
View file @
c1227d01
...
...
@@ -81,9 +81,12 @@ class SMSService implements SMSServiceContract
$feigesms
=
new
FeigeSMS
();
$surplus
=
$feigesms
->
system
();
$sid
=
SMS
::
max
(
'id'
);
$sms
=
SMS
::
find
(
$sid
);
if
(
$sms
==
null
){
return
$sms
;
}
if
(
$sms
->
created_at
->
isToday
()){
$date
=
Carbon
::
now
();
...
...
@@ -92,7 +95,6 @@ class SMSService implements SMSServiceContract
$addRecord
=
new
SMS
();
$addRecord
->
sms_surplus
=
$surplus
->
Balance
;
$addRecord
->
save
();
return
$surplus
;
}
...
...
app/Services/ScheduleService.php
View file @
c1227d01
...
...
@@ -79,7 +79,7 @@ class ScheduleService implements ScheduleServiceContract
public
function
getAll
()
{
$schedules
=
Schedule
::
all
();
if
(
count
(
$schedules
)
<
0
){
if
(
$schedules
->
isEmpty
()
){
return
null
;
}
else
{
return
$schedules
;
...
...
app/Services/StatisticsService.php
View file @
c1227d01
...
...
@@ -25,8 +25,8 @@ class StatisticsService implements StatisticsServiceContract
public
function
UserTotal
()
{
$users
=
User
::
all
();
$date
=
[
'全部用户'
=>
count
(
$users
)
];
$users
=
User
::
count
();
$date
=
[
'全部用户'
=>
$users
];
return
$date
;
}
...
...
@@ -153,7 +153,6 @@ class StatisticsService implements StatisticsServiceContract
});
})
->
get
();
if
(
!
$weekTask
->
isEmpty
()){
//dd(count($weekTask));
if
(
count
(
$weekTask
)
>=
1
){
$LastWeekActiveUser
+=
1
;
}
...
...
@@ -347,7 +346,7 @@ class StatisticsService implements StatisticsServiceContract
}
// 获取全部用户
$userCount
=
UserInfo
::
all
()
->
count
();
$userCount
=
UserInfo
::
count
();
$invitation
=
ceil
(
$a
/
$userCount
);
$timeline
=
ceil
(
$b
/
$userCount
);
...
...
database/migrations/2017_09_06_064645_create_users_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateUsersTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'users'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
string
(
'phone'
)
->
nullable
()
->
unique
();
$table
->
string
(
'user_name'
)
->
unique
();
$table
->
string
(
'real_name'
)
->
nullable
();
$table
->
string
(
'token'
)
->
nullable
();
$table
->
string
(
'head_icon'
)
->
nullable
();
$table
->
string
(
'password'
);
$table
->
boolean
(
'gender'
)
->
nullable
();
$table
->
string
(
'email'
)
->
nullable
()
->
unique
();
$table
->
unsignedInteger
(
'status'
)
->
default
(
0
);
$table
->
softDeletes
();
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'users'
);
}
}
database/migrations/2017_09_06_065429_create_groups_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateGroupsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'groups'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
unsignedInteger
(
'owner_id'
);
$table
->
unsignedInteger
(
'creator_id'
);
$table
->
string
(
'name'
);
$table
->
string
(
'brief'
)
->
nullable
();
$table
->
string
(
'logo'
)
->
nullable
();
$table
->
unsignedInteger
(
'status'
)
->
default
(
0
);
$table
->
softDeletes
();
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'groups'
);
}
}
database/migrations/2017_09_06_065755_create_user_groups_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateUserGroupsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'user_groups'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
unsignedInteger
(
'user_id'
);
$table
->
unsignedInteger
(
'group_id'
);
$table
->
boolean
(
"is_owner"
)
->
default
(
0
);
$table
->
unsignedInteger
(
'status'
)
->
default
(
0
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'user_groups'
);
}
}
database/migrations/2017_09_06_070104_create_projects_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateProjectsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'projects'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
string
(
'name'
);
$table
->
unsignedInteger
(
'creator_id'
);
$table
->
longText
(
'partners'
)
->
nullable
();
$table
->
string
(
'group_id'
)
->
nullable
();
$table
->
string
(
'brief'
)
->
nullable
();
$table
->
string
(
'cover_img'
)
->
nullable
();
$table
->
integer
(
"permission"
)
->
default
(
0
);
// $table->json("members")->nullable();
$table
->
softDeletes
();
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'projects'
);
}
}
database/migrations/2017_09_06_070533_create_tasks_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateTasksTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'tasks'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
unsignedInteger
(
'owner_id'
);
$table
->
unsignedInteger
(
'project_id'
);
$table
->
unsignedInteger
(
'creator_id'
);
$table
->
string
(
'brief'
)
->
nullable
();
$table
->
dateTime
(
'starts_at'
)
->
nullable
();
$table
->
dateTime
(
'ends_at'
)
->
nullable
();
$table
->
unsignedInteger
(
'status'
)
->
default
(
0
);
$table
->
softDeletes
();
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'tasks'
);
}
}
database/migrations/2017_09_06_070859_create_notifications_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateNotificationsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'notifications'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
unsignedInteger
(
'creator_id'
);
$table
->
string
(
'title'
);
$table
->
text
(
'content'
);
$table
->
unsignedInteger
(
'target_id'
)
->
nullable
();
$table
->
unsignedInteger
(
'status'
)
->
default
(
'0'
);
$table
->
tinyInteger
(
'is_group'
)
->
default
(
'0'
);
$table
->
longText
(
'target_ids'
)
->
nullable
();
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'notifications'
);
}
}
database/migrations/2017_09_06_071134_create_user_projects_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateUserProjectsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'user_projects'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
unsignedInteger
(
'project_id'
);
$table
->
unsignedInteger
(
'creator_id'
);
$table
->
string
(
'priority'
)
->
nullable
();
$table
->
unsignedInteger
(
'inviter_id'
)
->
nullable
();
$table
->
unsignedInteger
(
'status'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'user_projects'
);
}
}
database/migrations/2017_09_06_071718_create_schedules_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateSchedulesTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'schedules'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
unsignedInteger
(
'creator_id'
);
$table
->
unsignedInteger
(
'owner_id'
);
$table
->
text
(
'brief'
);
$table
->
dateTime
(
'starts_at'
);
$table
->
dateTime
(
"ends_at"
)
->
nullable
();
$table
->
softDeletes
();
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'schedules'
);
}
}
database/migrations/2017_09_06_072230_create_files_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateFilesTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'files'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
string
(
'name'
);
$table
->
string
(
'file_type'
);
$table
->
string
(
'size'
);
$table
->
unsignedInteger
(
'folder_id'
)
->
nullable
();
$table
->
unsignedInteger
(
'group_id'
)
->
nullable
();
$table
->
unsignedInteger
(
'owner_id'
);
$table
->
unsignedInteger
(
'creator_id'
);
$table
->
softDeletes
();
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'files'
);
}
}
database/migrations/2017_09_06_073140_create_wechats_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateWechatsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'wechats'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
unsignedInteger
(
'user_id'
)
->
unique
();
$table
->
unsignedInteger
(
'open_id'
)
->
unique
();
$table
->
string
(
'nickname'
)
->
nullable
();
$table
->
string
(
'head_icon'
)
->
nullable
();
$table
->
unsignedInteger
(
'sex'
)
->
nullable
();
$table
->
unsignedInteger
(
'subscribe'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'wechats'
);
}
}
database/migrations/2017_09_06_073357_create_get_passwords_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateGetPasswordsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'get_passwords'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
string
(
'phone'
)
->
nullable
();
$table
->
string
(
'token'
);
$table
->
string
(
'email'
)
->
nullable
();
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'get_passwords'
);
}
}
database/migrations/2017_09_06_073459_create_user_settings_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateUserSettingsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'user_settings'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
unsignedInteger
(
'current_group_id'
)
->
nullable
();
$table
->
unsignedInteger
(
'user_id'
);
$table
->
unsignedInteger
(
'stick_page_id'
)
->
nullable
();
$table
->
boolean
(
"is_new"
)
->
default
(
true
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'user_settings'
);
}
}
database/migrations/2017_09_07_032619_create_folders_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateFoldersTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'folders'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
string
(
'name'
);
$table
->
unsignedInteger
(
'parent_id'
);
$table
->
unsignedInteger
(
'creator_id'
);
$table
->
unsignedInteger
(
'owner_id'
);
$table
->
softDeletes
();
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'folders'
);
}
}
database/migrations/2017_09_07_071850_create_boards_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateBoardsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'boards'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
string
(
'name'
);
$table
->
longText
(
'tasks'
)
->
nullable
();
$table
->
char
(
'color'
,
8
)
->
nullable
();
$table
->
unsignedInteger
(
'project_id'
);
$table
->
unsignedInteger
(
'rank'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'boards'
);
}
}
database/migrations/2017_09_12_204651_create_sms_verifies_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateSmsVerifiesTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'sms_verifies'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
string
(
'phone'
);
$table
->
string
(
'verify_code'
);
$table
->
boolean
(
'is_checked'
)
->
default
(
false
);
$table
->
unsignedInteger
(
"action_id"
)
->
default
(
0
);
$table
->
ipAddress
(
"ip_address"
)
->
nullable
();
$table
->
string
(
"finger_print"
)
->
nullable
();
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'sms_verifies'
);
}
}
database/migrations/2017_09_13_163214_create_email_checks_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateEmailChecksTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'email_checks'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
unsignedInteger
(
'user_id'
)
->
nullable
();
$table
->
string
(
'email'
)
->
nullable
();
$table
->
string
(
'token'
);
$table
->
unsignedInteger
(
'status'
)
->
default
(
0
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'email_checks'
);
}
}
database/migrations/2017_10_13_132720_create_invitations_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateInvitationsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'invitations'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
unsignedInteger
(
'inviter_id'
);
$table
->
unsignedInteger
(
'target_id'
);
$table
->
unsignedInteger
(
'type'
)
->
default
(
'0'
);
$table
->
unsignedInteger
(
'status'
)
->
default
(
'0'
);
$table
->
unsignedInteger
(
'group_id'
);
$table
->
string
(
'token'
)
->
nullable
();
$table
->
text
(
'content'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'invitations'
);
}
}
database/migrations/2017_10_19_131831_create_statuses_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateStatusesTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'statuses'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
string
(
'name'
);
$table
->
unsignedInteger
(
'code'
);
$table
->
string
(
'brief'
);
$table
->
unsignedInteger
(
'father_id'
)
->
default
(
0
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'statuses'
);
}
}
database/migrations/2017_10_28_094448_create_default_pages_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateDefaultPagesTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'default_pages'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
string
(
'chinese'
);
$table
->
string
(
'page_name'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'default_pages'
);
}
}
database/migrations/2017_11_02_221732_create_notification_actions_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateNotificationActionsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'notification_actions'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
unsignedInteger
(
"noti_id"
);
$table
->
string
(
"target_table"
);
$table
->
string
(
"target_column"
);
$table
->
unsignedInteger
(
"target_id"
);
$table
->
string
(
"explain"
);
$table
->
string
(
"target_value_type"
);
$table
->
string
(
"target_value"
);
$table
->
integer
(
"status"
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'notification_actions'
);
}
}
database/migrations/2017_11_13_093841_create_user_infos_table.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
class
CreateUserInfosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'user_infos'
,
function
(
Blueprint
$table
)
{
$table
->
increments
(
'id'
);
$table
->
unsignedInteger
(
'user_id'
);
$table
->
string
(
'terminal'
);
$table
->
string
(
'manner'
);
$table
->
dateTime
(
'last_login_time'
);
$table
->
boolean
(
'return_visit'
)
->
default
(
0
);
$table
->
longText
(
'page_retention_time'
)
->
nullabel
();
$table
->
longText
(
'user_engagement'
)
->
nullabel
();
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'user_infos'
);
}
}
database/seeds/DatabaseSeeder.php
View file @
c1227d01
...
...
@@ -18,5 +18,6 @@ class DatabaseSeeder extends Seeder
$this
->
call
(
RolesTableSeeder
::
class
);
$this
->
call
(
RoleAdminsTableSeeder
::
class
);
$this
->
call
(
PermissionRoleTableSeeder
::
class
);
$this
->
call
(
SmsTableSeeder
::
class
);
}
}
database/seeds/SmsTableSeeder.php
0 → 100644
View file @
c1227d01
<?php
use
Illuminate\Database\Seeder
;
class
SmsTableSeeder
extends
Seeder
{
/**
* Auto generated seed file
*
* @return void
*/
public
function
run
()
{
\DB
::
table
(
'sms'
)
->
delete
();
\DB
::
table
(
'sms'
)
->
insert
(
array
(
0
=>
array
(
'id'
=>
1
,
'sms_surplus'
=>
2
,
'created_at'
=>
'2017-09-28 03:33:31'
,
'updated_at'
=>
'2017-09-28 03:33:31'
,
),
1
=>
array
(
'id'
=>
2
,
'sms_surplus'
=>
3
,
'created_at'
=>
'2017-09-28 18:06:13'
,
'updated_at'
=>
'2017-09-29 16:06:19'
,
),
2
=>
array
(
'id'
=>
3
,
'sms_surplus'
=>
3
,
'created_at'
=>
'2017-10-09 13:20:33'
,
'updated_at'
=>
'2017-10-09 13:20:33'
,
),
3
=>
array
(
'id'
=>
4
,
'sms_surplus'
=>
3
,
'created_at'
=>
'2017-10-09 14:09:06'
,
'updated_at'
=>
'2017-10-09 14:09:06'
,
),
4
=>
array
(
'id'
=>
5
,
'sms_surplus'
=>
3
,
'created_at'
=>
'2017-10-09 14:38:05'
,
'updated_at'
=>
'2017-10-09 14:38:05'
,
),
5
=>
array
(
'id'
=>
6
,
'sms_surplus'
=>
3
,
'created_at'
=>
'2017-10-09 14:50:04'
,
'updated_at'
=>
'2017-10-09 14:50:04'
,
),
6
=>
array
(
'id'
=>
7
,
'sms_surplus'
=>
3
,
'created_at'
=>
'2017-10-09 14:54:22'
,
'updated_at'
=>
'2017-10-09 14:54:22'
,
),
7
=>
array
(
'id'
=>
8
,
'sms_surplus'
=>
3
,
'created_at'
=>
'2017-10-09 16:05:43'
,
'updated_at'
=>
'2017-10-09 16:05:43'
,
),
8
=>
array
(
'id'
=>
9
,
'sms_surplus'
=>
3
,
'created_at'
=>
'2017-10-09 16:08:07'
,
'updated_at'
=>
'2017-10-09 16:08:07'
,
),
9
=>
array
(
'id'
=>
10
,
'sms_surplus'
=>
3
,
'created_at'
=>
'2017-10-09 16:38:37'
,
'updated_at'
=>
'2017-10-09 16:38:37'
,
),
));
}
}
\ No newline at end of file
resources/views/admin/sms/smsstatistics.blade.php
View file @
c1227d01
...
...
@@ -12,7 +12,7 @@
<
div
class
=
"info-box-content"
>
<
span
class
=
"info-box-text"
>
短信剩余
</
span
>
<
span
class
=
"info-box-number"
>
{{
$surplus
->
Balance
}}
条
</
span
>
<
span
class
=
"info-box-number"
>
{{
$surplus
==
null
?
0
:
$surplus
->
Balance
}}
条
</
span
>
</
div
>
<!--
/.
info
-
box
-
content
-->
</
div
>
...
...
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