mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-07-23 00:16:39 +08:00
统一时间字段命名
This commit is contained in:
parent
1e303265b5
commit
bcba85d0be
@ -69,7 +69,7 @@ class LatestCourseList extends Cache
|
|||||||
{
|
{
|
||||||
return CourseModel::query()
|
return CourseModel::query()
|
||||||
->where('deleted = 0')
|
->where('deleted = 0')
|
||||||
->orderBy('created_at DESC')
|
->orderBy('create_time DESC')
|
||||||
->limit($limit)
|
->limit($limit)
|
||||||
->execute();
|
->execute();
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ class CleanAuthTokenTask extends Task
|
|||||||
protected function findAccessTokens()
|
protected function findAccessTokens()
|
||||||
{
|
{
|
||||||
return AccessTokenModel::query()
|
return AccessTokenModel::query()
|
||||||
->where('expired_at < :expired_at:', ['expired_at' => time()])
|
->where('expiry_time < :expiry_time:', ['expiry_time' => time()])
|
||||||
->execute();
|
->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ class CleanAuthTokenTask extends Task
|
|||||||
protected function findRefreshTokens()
|
protected function findRefreshTokens()
|
||||||
{
|
{
|
||||||
return RefreshTokenModel::query()
|
return RefreshTokenModel::query()
|
||||||
->where('expired_at < :expired_at:', ['expired_at' => time()])
|
->where('expiry_time < :expiry_time:', ['expiry_time' => time()])
|
||||||
->execute();
|
->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,11 +34,11 @@ class CloseOrderTask extends Task
|
|||||||
{
|
{
|
||||||
$status = OrderModel::STATUS_PENDING;
|
$status = OrderModel::STATUS_PENDING;
|
||||||
|
|
||||||
$createdAt = time() - 12 * 3600;
|
$createTime = time() - 12 * 3600;
|
||||||
|
|
||||||
return OrderModel::query()
|
return OrderModel::query()
|
||||||
->where('status = :status:', ['status' => $status])
|
->where('status = :status:', ['status' => $status])
|
||||||
->andWhere('created_at < :created_at:', ['created_at' => $createdAt])
|
->andWhere('create_time < :create_time:', ['create_time' => $createTime])
|
||||||
->limit($limit)
|
->limit($limit)
|
||||||
->execute();
|
->execute();
|
||||||
}
|
}
|
||||||
|
@ -73,11 +73,11 @@ class CloseTradeTask extends Task
|
|||||||
{
|
{
|
||||||
$status = TradeModel::STATUS_PENDING;
|
$status = TradeModel::STATUS_PENDING;
|
||||||
|
|
||||||
$createdAt = time() - 15 * 60;
|
$createTime = time() - 15 * 60;
|
||||||
|
|
||||||
return TradeModel::query()
|
return TradeModel::query()
|
||||||
->where('status = :status:', ['status' => $status])
|
->where('status = :status:', ['status' => $status])
|
||||||
->andWhere('created_at < :created_at:', ['created_at' => $createdAt])
|
->andWhere('create_time < :create_time:', ['create_time' => $createTime])
|
||||||
->limit($limit)
|
->limit($limit)
|
||||||
->execute();
|
->execute();
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
<td><a class="kg-ip2region" href="javascript:;" title="查看位置" ip="{{ item.user_ip }}">{{ item.user_ip }}</a></td>
|
<td><a class="kg-ip2region" href="javascript:;" title="查看位置" ip="{{ item.user_ip }}">{{ item.user_ip }}</a></td>
|
||||||
<td>{{ item.req_route }}</td>
|
<td>{{ item.req_route }}</td>
|
||||||
<td>{{ item.req_path }}</td>
|
<td>{{ item.req_path }}</td>
|
||||||
<td>{{ date('Y-m-d H:i:s',item.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i:s',item.create_time) }}</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<button class="kg-view layui-btn layui-btn-sm" audit-id="{{ item.id }}">浏览</button>
|
<button class="kg-view layui-btn layui-btn-sm" audit-id="{{ item.id }}">浏览</button>
|
||||||
</td>
|
</td>
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
<p>昵称:{{ item.user.name }}</p>
|
<p>昵称:{{ item.user.name }}</p>
|
||||||
<p>编号:{{ item.user.id }}</p>
|
<p>编号:{{ item.user.id }}</p>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ date('Y-m-d H:i',item.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i',item.create_time) }}</td>
|
||||||
<td><input type="checkbox" name="published" value="1" lay-skin="switch" lay-text="是|否"
|
<td><input type="checkbox" name="published" value="1" lay-skin="switch" lay-text="是|否"
|
||||||
lay-filter="switch-published" comment-id="{{ item.id }}"
|
lay-filter="switch-published" comment-id="{{ item.id }}"
|
||||||
{% if item.published == 1 %}checked{% endif %}></td>
|
{% if item.published == 1 %}checked{% endif %}></td>
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<p>昵称:{{ item.user.name }}</p>
|
<p>昵称:{{ item.user.name }}</p>
|
||||||
<p>编号:{{ item.user.id }}</p>
|
<p>编号:{{ item.user.id }}</p>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ date('Y-m-d H:i',item.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i',item.create_time) }}</td>
|
||||||
<td><input type="checkbox" name="published" value="1" lay-skin="switch" lay-text="是|否"
|
<td><input type="checkbox" name="published" value="1" lay-skin="switch" lay-text="是|否"
|
||||||
lay-filter="switch-published" consult-id="{{ item.id }}"
|
lay-filter="switch-published" consult-id="{{ item.id }}"
|
||||||
{% if item.published == 1 %}checked{% endif %}></td>
|
{% if item.published == 1 %}checked{% endif %}></td>
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{{ item.id }}</td>
|
<td>{{ item.id }}</td>
|
||||||
<td>{{ item.title }}</td>
|
<td>{{ item.title }}</td>
|
||||||
<td>{{ date('Y-m-d H:i',item.updated_at) }}</td>
|
<td>{{ date('Y-m-d H:i',item.update_time) }}</td>
|
||||||
<td><input class="layui-input kg-priority-input" type="text" name="priority" value="{{ item.priority }}" help-id="{{ item.id }}" title="数值越小排序越靠前"></td>
|
<td><input class="layui-input kg-priority-input" type="text" name="priority" value="{{ item.priority }}" help-id="{{ item.id }}" title="数值越小排序越靠前"></td>
|
||||||
<td><input type="checkbox" name="published" value="1" lay-skin="switch" lay-text="是|否" lay-filter="switch-published" help-id="{{ item.id }}" {% if item.published == 1 %}checked{% endif %}>
|
<td><input type="checkbox" name="published" value="1" lay-skin="switch" lay-text="是|否" lay-filter="switch-published" help-id="{{ item.id }}" {% if item.published == 1 %}checked{% endif %}>
|
||||||
</td>
|
</td>
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>¥{{ item.amount }}</td>
|
<td>¥{{ item.amount }}</td>
|
||||||
<td>{{ order_status(item.status) }}</td>
|
<td>{{ order_status(item.status) }}</td>
|
||||||
<td>{{ date('Y-m-d H:i',item.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i',item.create_time) }}</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a class="layui-btn layui-btn-sm layui-bg-green" href="{{ url({'for':'admin.order.show','id':item.id}) }}">详情</a>
|
<a class="layui-btn layui-btn-sm layui-bg-green" href="{{ url({'for':'admin.order.show','id':item.id}) }}">详情</a>
|
||||||
</td>
|
</td>
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
<td>¥{{ order.amount }}</td>
|
<td>¥{{ order.amount }}</td>
|
||||||
<td>{{ item_type(order.item_type) }}</span></td>
|
<td>{{ item_type(order.item_type) }}</span></td>
|
||||||
<td>{{ order_status(order.status) }}</td>
|
<td>{{ order_status(order.status) }}</td>
|
||||||
<td>{{ date('Y-m-d H:i',order.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i',order.create_time) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -54,7 +54,7 @@
|
|||||||
<td>¥{{ item.amount }}</td>
|
<td>¥{{ item.amount }}</td>
|
||||||
<td><a href="#" title="{{ item.apply_note }}">{{ substr(item.apply_note,0,15) }}</td>
|
<td><a href="#" title="{{ item.apply_note }}">{{ substr(item.apply_note,0,15) }}</td>
|
||||||
<td>{{ refund_status(item) }}</td>
|
<td>{{ refund_status(item) }}</td>
|
||||||
<td>{{ date('Y-m-d H:i',item.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i',item.create_time) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
@ -80,7 +80,7 @@
|
|||||||
<td>¥{{ item.amount }}</td>
|
<td>¥{{ item.amount }}</td>
|
||||||
<td>{{ channel_type(item.channel) }}</td>
|
<td>{{ channel_type(item.channel) }}</td>
|
||||||
<td>{{ trade_status(item.status) }}</td>
|
<td>{{ trade_status(item.status) }}</td>
|
||||||
<td>{{ date('Y-m-d H:i',item.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i',item.create_time) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
|
@ -35,8 +35,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{{ item.id }}</td>
|
<td>{{ item.id }}</td>
|
||||||
<td>{{ item.title }}</td>
|
<td>{{ item.title }}</td>
|
||||||
<td>{{ date('Y-m-d H:i',item.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i',item.create_time) }}</td>
|
||||||
<td>{{ date('Y-m-d H:i',item.updated_at) }}</td>
|
<td>{{ date('Y-m-d H:i',item.update_time) }}</td>
|
||||||
<td><input type="checkbox" name="published" value="1" lay-skin="switch" lay-text="是|否" lay-filter="switch-published" page-id="{{ item.id }}" {% if item.published == 1 %}checked{% endif %}>
|
<td><input type="checkbox" name="published" value="1" lay-skin="switch" lay-text="是|否" lay-filter="switch-published" page-id="{{ item.id }}" {% if item.published == 1 %}checked{% endif %}>
|
||||||
</td>
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>¥{{ item.amount }}</td>
|
<td>¥{{ item.amount }}</td>
|
||||||
<td>{{ refund_status(item) }}</td>
|
<td>{{ refund_status(item) }}</td>
|
||||||
<td>{{ date('Y-m-d H:i',item.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i',item.create_time) }}</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a class="layui-btn layui-btn-sm layui-bg-green" href="{{ url({'for':'admin.refund.show','id':item.id}) }}">详情</a>
|
<a class="layui-btn layui-btn-sm layui-bg-green" href="{{ url({'for':'admin.refund.show','id':item.id}) }}">详情</a>
|
||||||
</td>
|
</td>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<td>¥{{ refund.amount }}</td>
|
<td>¥{{ refund.amount }}</td>
|
||||||
<td><span title="{{ refund.apply_note }}">{{ substr(refund.apply_note,0,15) }}</span></td>
|
<td><span title="{{ refund.apply_note }}">{{ substr(refund.apply_note,0,15) }}</span></td>
|
||||||
<td>{{ refund_status(refund) }}</td>
|
<td>{{ refund_status(refund) }}</td>
|
||||||
<td>{{ date('Y-m-d H:i',refund.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i',refund.create_time) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -74,7 +74,7 @@
|
|||||||
<td>¥{{ trade.amount }}</td>
|
<td>¥{{ trade.amount }}</td>
|
||||||
<td>{{ channel_type(trade.channel) }}</td>
|
<td>{{ channel_type(trade.channel) }}</td>
|
||||||
<td>{{ trade_status(trade.status) }}</td>
|
<td>{{ trade_status(trade.status) }}</td>
|
||||||
<td>{{ date('Y-m-d H:i',trade.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i',trade.create_time) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -97,7 +97,7 @@
|
|||||||
<td>{{ order.subject }}</td>
|
<td>{{ order.subject }}</td>
|
||||||
<td>¥{{ order.amount }}</td>
|
<td>¥{{ order.amount }}</td>
|
||||||
<td>{{ order_status(order.status) }}</td>
|
<td>{{ order_status(order.status) }}</td>
|
||||||
<td>{{ date('Y-m-d H:i',order.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i',order.create_time) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
<p>昵称:{{ item.user.name }}</p>
|
<p>昵称:{{ item.user.name }}</p>
|
||||||
<p>编号:{{ item.user.id }}</p>
|
<p>编号:{{ item.user.id }}</p>
|
||||||
</td>
|
</td>
|
||||||
<td>{{ date('Y-m-d H:i',item.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i',item.create_time) }}</td>
|
||||||
<td><input type="checkbox" name="published" value="1" lay-skin="switch" lay-text="是|否" lay-filter="switch-published" review-id="{{ item.id }}"
|
<td><input type="checkbox" name="published" value="1" lay-skin="switch" lay-text="是|否" lay-filter="switch-published" review-id="{{ item.id }}"
|
||||||
{% if item.published == 1 %}checked{% endif %}></td>
|
{% if item.published == 1 %}checked{% endif %}></td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
|
@ -6,11 +6,11 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{%- macro last_active(created_at, updated_at) %}
|
{%- macro last_active(create_time, update_time) %}
|
||||||
{% if updated_at > 0 %}
|
{% if update_time > 0 %}
|
||||||
{{ date('Y-m-d H:i', updated_at) }}
|
{{ date('Y-m-d H:i', update_time) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ date('Y-m-d H:i', created_at) }}
|
{{ date('Y-m-d H:i', create_time) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
@ -41,7 +41,7 @@
|
|||||||
<td>{{ item.duration|play_duration }}</td>
|
<td>{{ item.duration|play_duration }}</td>
|
||||||
<td>{{ client_type(item.client_type) }}</td>
|
<td>{{ client_type(item.client_type) }}</td>
|
||||||
<td><a class="kg-ip2region" href="javascript:;" title="查看位置" ip="{{ item.client_ip }}">{{ item.client_ip }}</a></td>
|
<td><a class="kg-ip2region" href="javascript:;" title="查看位置" ip="{{ item.client_ip }}">{{ item.client_ip }}</a></td>
|
||||||
<td>{{ last_active(item.created_at, item.updated_at) }}</td>
|
<td>{{ last_active(item.create_time, item.update_time) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
<td>¥{{ item.amount }}</td>
|
<td>¥{{ item.amount }}</td>
|
||||||
<td>{{ channel_type(item.channel) }}</td>
|
<td>{{ channel_type(item.channel) }}</td>
|
||||||
<td>{{ trade_status(item.status) }}</td>
|
<td>{{ trade_status(item.status) }}</td>
|
||||||
<td>{{ date('Y-m-d H:i',item.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i',item.create_time) }}</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<a class="layui-btn layui-btn-sm layui-bg-green" href="{{ url({'for':'admin.trade.show','id':item.id}) }}">详情</a>
|
<a class="layui-btn layui-btn-sm layui-bg-green" href="{{ url({'for':'admin.trade.show','id':item.id}) }}">详情</a>
|
||||||
</td>
|
</td>
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<td>¥{{ trade.amount }}</td>
|
<td>¥{{ trade.amount }}</td>
|
||||||
<td>{{ channel_type(trade.channel) }}</td>
|
<td>{{ channel_type(trade.channel) }}</td>
|
||||||
<td>{{ trade_status(trade.status) }}</td>
|
<td>{{ trade_status(trade.status) }}</td>
|
||||||
<td>{{ date('Y-m-d H:i',trade.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i',trade.create_time) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@ -53,7 +53,7 @@
|
|||||||
<td>¥{{ item.amount }}</td>
|
<td>¥{{ item.amount }}</td>
|
||||||
<td><a href="#" title="{{ item.apply_note }}">{{ substr(item.apply_note,0,15) }}</td>
|
<td><a href="#" title="{{ item.apply_note }}">{{ substr(item.apply_note,0,15) }}</td>
|
||||||
<td>{{ refund_status(item) }}</td>
|
<td>{{ refund_status(item) }}</td>
|
||||||
<td>{{ date('Y-m-d H:i',item.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i',item.create_time) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
@ -78,7 +78,7 @@
|
|||||||
<td>{{ order.subject }}</td>
|
<td>{{ order.subject }}</td>
|
||||||
<td>¥{{ order.amount }}</td>
|
<td>¥{{ order.amount }}</td>
|
||||||
<td>{{ order_status(order.status) }}</td>
|
<td>{{ order_status(order.status) }}</td>
|
||||||
<td>{{ date('Y-m-d H:i',order.created_at) }}</td>
|
<td>{{ date('Y-m-d H:i',order.create_time) }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -33,7 +33,21 @@ class AccessToken extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $expired_at;
|
public $expiry_time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $create_time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -44,7 +58,14 @@ class AccessToken extends Model
|
|||||||
{
|
{
|
||||||
$this->id = $this->getRandId($this->user_id);
|
$this->id = $this->getRandId($this->user_id);
|
||||||
|
|
||||||
$this->expired_at = strtotime('+2 hours');
|
$this->expiry_time = strtotime('+2 hours');
|
||||||
|
|
||||||
|
$this->create_time = time();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function beforeUpdate()
|
||||||
|
{
|
||||||
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterCreate()
|
public function afterCreate()
|
||||||
|
@ -55,14 +55,14 @@ class Account extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -87,7 +87,7 @@ class Account extends Model
|
|||||||
|
|
||||||
$this->password = Password::hash($this->password, $this->salt);
|
$this->password = Password::hash($this->password, $this->salt);
|
||||||
|
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
@ -99,7 +99,7 @@ class Account extends Model
|
|||||||
$this->password = Password::hash($this->password, $this->salt);
|
$this->password = Password::hash($this->password, $this->salt);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterCreate()
|
public function afterCreate()
|
||||||
|
@ -59,7 +59,7 @@ class Audit extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -68,7 +68,7 @@ class Audit extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
|
|
||||||
if (!empty($this->req_data)) {
|
if (!empty($this->req_data)) {
|
||||||
$this->req_data = kg_json_encode($this->req_data);
|
$this->req_data = kg_json_encode($this->req_data);
|
||||||
|
@ -85,14 +85,14 @@ class Category extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -113,12 +113,12 @@ class Category extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterCreate()
|
public function afterCreate()
|
||||||
|
@ -160,14 +160,14 @@ class Chapter extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -188,7 +188,7 @@ class Chapter extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
|
|
||||||
if ($this->parent_id > 0) {
|
if ($this->parent_id > 0) {
|
||||||
|
|
||||||
@ -216,7 +216,7 @@ class Chapter extends Model
|
|||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
|
|
||||||
if (!empty($this->attrs)) {
|
if (!empty($this->attrs)) {
|
||||||
$this->attrs = kg_json_encode($this->attrs);
|
$this->attrs = kg_json_encode($this->attrs);
|
||||||
|
@ -52,14 +52,14 @@ class ChapterLive extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -68,12 +68,12 @@ class ChapterLive extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -51,14 +51,14 @@ class ChapterRead extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -67,12 +67,12 @@ class ChapterRead extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function formatTypes()
|
public static function formatTypes()
|
||||||
|
@ -75,14 +75,14 @@ class ChapterUser extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -103,12 +103,12 @@ class ChapterUser extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -47,14 +47,14 @@ class ChapterVod extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -63,7 +63,7 @@ class ChapterVod extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
|
|
||||||
if (!empty($this->file_transcode)) {
|
if (!empty($this->file_transcode)) {
|
||||||
$this->file_transcode = kg_json_encode($this->file_transcode);
|
$this->file_transcode = kg_json_encode($this->file_transcode);
|
||||||
@ -72,7 +72,7 @@ class ChapterVod extends Model
|
|||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
|
|
||||||
if (!empty($this->file_transcode)) {
|
if (!empty($this->file_transcode)) {
|
||||||
$this->file_transcode = kg_json_encode($this->file_transcode);
|
$this->file_transcode = kg_json_encode($this->file_transcode);
|
||||||
|
@ -54,14 +54,14 @@ class ChapterVote extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -82,12 +82,12 @@ class ChapterVote extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,35 +10,35 @@ class Comment extends Model
|
|||||||
/**
|
/**
|
||||||
* 主键编号
|
* 主键编号
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $id;
|
public $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 父级编号
|
* 父级编号
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $parent_id;
|
public $parent_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课程编号
|
* 课程编号
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $course_id;
|
public $course_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 章节编号
|
* 章节编号
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $chapter_id;
|
public $chapter_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户编号
|
* 用户编号
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $user_id;
|
public $user_id;
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ class Comment extends Model
|
|||||||
/**
|
/**
|
||||||
* 回复数
|
* 回复数
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $reply_count;
|
public $reply_count;
|
||||||
|
|
||||||
@ -96,16 +96,16 @@ class Comment extends Model
|
|||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
|
@ -54,14 +54,14 @@ class CommentVote extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -82,12 +82,12 @@ class CommentVote extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,21 +10,21 @@ class Consult extends Model
|
|||||||
/**
|
/**
|
||||||
* 主键编号
|
* 主键编号
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $id;
|
public $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课程编号
|
* 课程编号
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $course_id;
|
public $course_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户编号
|
* 用户编号
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $user_id;
|
public $user_id;
|
||||||
|
|
||||||
@ -73,16 +73,16 @@ class Consult extends Model
|
|||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -103,12 +103,12 @@ class Consult extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,21 +17,21 @@ class ConsultVote extends Model
|
|||||||
/**
|
/**
|
||||||
* 主键编号
|
* 主键编号
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $id;
|
public $id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 咨询编号
|
* 咨询编号
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $consult_id;
|
public $consult_id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户编号
|
* 用户编号
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $user_id;
|
public $user_id;
|
||||||
|
|
||||||
@ -52,9 +52,9 @@ class ConsultVote extends Model
|
|||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -75,12 +75,12 @@ class ConsultVote extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -33,14 +33,14 @@ class ContentImage extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -61,7 +61,7 @@ class ContentImage extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
|
@ -50,13 +50,6 @@ class Course extends Model
|
|||||||
*/
|
*/
|
||||||
public $id;
|
public $id;
|
||||||
|
|
||||||
/**
|
|
||||||
* 类型
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
public $class_id;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 标题
|
* 标题
|
||||||
*
|
*
|
||||||
@ -209,14 +202,14 @@ class Course extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -237,7 +230,7 @@ class Course extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
|
|
||||||
$attrs = [];
|
$attrs = [];
|
||||||
|
|
||||||
@ -256,12 +249,11 @@ class Course extends Model
|
|||||||
if (!empty($attrs)) {
|
if (!empty($attrs)) {
|
||||||
$this->attrs = kg_json_encode($attrs);
|
$this->attrs = kg_json_encode($attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
|
|
||||||
if (!empty($this->attrs)) {
|
if (!empty($this->attrs)) {
|
||||||
$this->attrs = kg_json_encode($this->attrs);
|
$this->attrs = kg_json_encode($this->attrs);
|
||||||
@ -281,51 +273,43 @@ class Course extends Model
|
|||||||
|
|
||||||
public static function modelTypes()
|
public static function modelTypes()
|
||||||
{
|
{
|
||||||
$types = [
|
return [
|
||||||
self::MODEL_VOD => '点播',
|
self::MODEL_VOD => '点播',
|
||||||
self::MODEL_LIVE => '直播',
|
self::MODEL_LIVE => '直播',
|
||||||
self::MODEL_READ => '图文',
|
self::MODEL_READ => '图文',
|
||||||
];
|
];
|
||||||
|
|
||||||
return $types;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function levelTypes()
|
public static function levelTypes()
|
||||||
{
|
{
|
||||||
$types = [
|
return [
|
||||||
self::LEVEL_ENTRY => '入门',
|
self::LEVEL_ENTRY => '入门',
|
||||||
self::LEVEL_JUNIOR => '初级',
|
self::LEVEL_JUNIOR => '初级',
|
||||||
self::LEVEL_MEDIUM => '中级',
|
self::LEVEL_MEDIUM => '中级',
|
||||||
self::LEVEL_SENIOR => '高级',
|
self::LEVEL_SENIOR => '高级',
|
||||||
];
|
];
|
||||||
|
|
||||||
return $types;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function studyExpiryOptions()
|
public static function studyExpiryOptions()
|
||||||
{
|
{
|
||||||
$options = [
|
return [
|
||||||
1 => '1个月',
|
1 => '1个月',
|
||||||
3 => '3个月',
|
3 => '3个月',
|
||||||
6 => '6个月',
|
6 => '6个月',
|
||||||
12 => '12个月',
|
12 => '12个月',
|
||||||
36 => '36个月',
|
36 => '36个月',
|
||||||
];
|
];
|
||||||
|
|
||||||
return $options;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function refundExpiryOptions()
|
public static function refundExpiryOptions()
|
||||||
{
|
{
|
||||||
$options = [
|
return [
|
||||||
7 => '7天',
|
7 => '7天',
|
||||||
14 => '14天',
|
14 => '14天',
|
||||||
30 => '30天',
|
30 => '30天',
|
||||||
90 => '90天',
|
90 => '90天',
|
||||||
180 => '180天',
|
180 => '180天',
|
||||||
];
|
];
|
||||||
|
|
||||||
return $options;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ class CourseCategory extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -40,7 +40,7 @@ class CourseCategory extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -40,14 +40,14 @@ class CourseFavorite extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -68,12 +68,12 @@ class CourseFavorite extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ class CoursePackage extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -40,7 +40,7 @@ class CoursePackage extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ class CourseRelated extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -40,7 +40,7 @@ class CourseRelated extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ class CourseTopic extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -40,7 +40,7 @@ class CourseTopic extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -95,14 +95,14 @@ class CourseUser extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -123,12 +123,12 @@ class CourseUser extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function roleTypes()
|
public static function roleTypes()
|
||||||
|
@ -52,14 +52,14 @@ class Help extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -68,12 +68,12 @@ class Help extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -79,14 +79,14 @@ class Learning extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -95,12 +95,12 @@ class Learning extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -109,14 +109,14 @@ class Nav extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -137,12 +137,12 @@ class Nav extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterCreate()
|
public function afterCreate()
|
||||||
|
@ -120,14 +120,14 @@ class Order extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -152,7 +152,7 @@ class Order extends Model
|
|||||||
|
|
||||||
$this->sn = date('YmdHis') . rand(1000, 9999);
|
$this->sn = date('YmdHis') . rand(1000, 9999);
|
||||||
|
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
|
|
||||||
if (!empty($this->item_info)) {
|
if (!empty($this->item_info)) {
|
||||||
$this->item_info = kg_json_encode($this->item_info);
|
$this->item_info = kg_json_encode($this->item_info);
|
||||||
@ -163,7 +163,7 @@ class Order extends Model
|
|||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
|
|
||||||
if (!empty($this->item_info)) {
|
if (!empty($this->item_info)) {
|
||||||
$this->item_info = kg_json_encode($this->item_info);
|
$this->item_info = kg_json_encode($this->item_info);
|
||||||
|
@ -68,14 +68,14 @@ class Package extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -96,12 +96,12 @@ class Package extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterFetch()
|
public function afterFetch()
|
||||||
|
@ -40,14 +40,14 @@ class Page extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -68,12 +68,12 @@ class Page extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,21 @@ class RefreshToken extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $expired_at;
|
public $expiry_time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $create_time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -42,7 +56,14 @@ class RefreshToken extends Model
|
|||||||
{
|
{
|
||||||
$this->id = $this->getRandId($this->user_id);
|
$this->id = $this->getRandId($this->user_id);
|
||||||
|
|
||||||
$this->expired_at = strtotime('+30 days');
|
$this->expiry_time = strtotime('+30 days');
|
||||||
|
|
||||||
|
$this->create_time = time();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function beforeUpdate()
|
||||||
|
{
|
||||||
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getRandId($userId, $prefix = 'RT')
|
protected function getRandId($userId, $prefix = 'RT')
|
||||||
|
@ -99,14 +99,14 @@ class Refund extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -131,12 +131,12 @@ class Refund extends Model
|
|||||||
|
|
||||||
$this->sn = date('YmdHis') . rand(1000, 9999);
|
$this->sn = date('YmdHis') . rand(1000, 9999);
|
||||||
|
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterFetch()
|
public function afterFetch()
|
||||||
|
@ -61,14 +61,14 @@ class Review extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -89,12 +89,12 @@ class Review extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ class ReviewVote extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -75,12 +75,12 @@ class ReviewVote extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -75,14 +75,14 @@ class Role extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -103,7 +103,7 @@ class Role extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
|
|
||||||
if (!empty($this->routes)) {
|
if (!empty($this->routes)) {
|
||||||
$this->routes = kg_json_encode($this->routes);
|
$this->routes = kg_json_encode($this->routes);
|
||||||
@ -112,7 +112,7 @@ class Role extends Model
|
|||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
|
|
||||||
if (!empty($this->routes)) {
|
if (!empty($this->routes)) {
|
||||||
$this->routes = kg_json_encode($this->routes);
|
$this->routes = kg_json_encode($this->routes);
|
||||||
|
@ -83,14 +83,14 @@ class Slide extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -111,12 +111,12 @@ class Slide extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterCreate()
|
public function afterCreate()
|
||||||
|
@ -80,14 +80,14 @@ class Task extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -98,7 +98,7 @@ class Task extends Model
|
|||||||
{
|
{
|
||||||
$this->status = self::STATUS_PENDING;
|
$this->status = self::STATUS_PENDING;
|
||||||
|
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
|
|
||||||
if (!empty($this->item_info)) {
|
if (!empty($this->item_info)) {
|
||||||
$this->item_info = kg_json_encode($this->item_info);
|
$this->item_info = kg_json_encode($this->item_info);
|
||||||
@ -109,7 +109,7 @@ class Task extends Model
|
|||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
|
|
||||||
if (!empty($this->item_info)) {
|
if (!empty($this->item_info)) {
|
||||||
$this->item_info = kg_json_encode($this->item_info);
|
$this->item_info = kg_json_encode($this->item_info);
|
||||||
|
@ -61,14 +61,14 @@ class Topic extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -89,12 +89,12 @@ class Topic extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -96,14 +96,14 @@ class Trade extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -128,12 +128,12 @@ class Trade extends Model
|
|||||||
|
|
||||||
$this->sn = date('YmdHis') . rand(1000, 9999);
|
$this->sn = date('YmdHis') . rand(1000, 9999);
|
||||||
|
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterFetch()
|
public function afterFetch()
|
||||||
|
@ -138,14 +138,14 @@ class User extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -166,12 +166,12 @@ class User extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterCreate()
|
public function afterCreate()
|
||||||
|
@ -47,14 +47,14 @@ class Vip extends Model
|
|||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $created_at;
|
public $create_time;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $updated_at;
|
public $update_time;
|
||||||
|
|
||||||
public function getSource()
|
public function getSource()
|
||||||
{
|
{
|
||||||
@ -75,12 +75,12 @@ class Vip extends Model
|
|||||||
|
|
||||||
public function beforeCreate()
|
public function beforeCreate()
|
||||||
{
|
{
|
||||||
$this->created_at = time();
|
$this->create_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function beforeUpdate()
|
public function beforeUpdate()
|
||||||
{
|
{
|
||||||
$this->updated_at = time();
|
$this->update_time = time();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterFetch()
|
public function afterFetch()
|
||||||
|
@ -38,7 +38,7 @@ class Audit extends Repository
|
|||||||
if (!empty($where['start_time']) && !empty($where['end_time'])) {
|
if (!empty($where['start_time']) && !empty($where['end_time'])) {
|
||||||
$startTime = strtotime($where['start_time']);
|
$startTime = strtotime($where['start_time']);
|
||||||
$endTime = strtotime($where['end_time']);
|
$endTime = strtotime($where['end_time']);
|
||||||
$builder->betweenWhere('created_at', $startTime, $endTime);
|
$builder->betweenWhere('create_time', $startTime, $endTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($sort) {
|
switch ($sort) {
|
||||||
|
@ -48,7 +48,7 @@ class Order extends Repository
|
|||||||
if (!empty($where['start_time']) && !empty($where['end_time'])) {
|
if (!empty($where['start_time']) && !empty($where['end_time'])) {
|
||||||
$startTime = strtotime($where['start_time']);
|
$startTime = strtotime($where['start_time']);
|
||||||
$endTime = strtotime($where['end_time']);
|
$endTime = strtotime($where['end_time']);
|
||||||
$builder->betweenWhere('created_at', $startTime, $endTime);
|
$builder->betweenWhere('create_time', $startTime, $endTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($sort) {
|
switch ($sort) {
|
||||||
|
@ -34,7 +34,7 @@ class Refund extends Repository
|
|||||||
if (!empty($where['start_time']) && !empty($where['end_time'])) {
|
if (!empty($where['start_time']) && !empty($where['end_time'])) {
|
||||||
$startTime = strtotime($where['start_time']);
|
$startTime = strtotime($where['start_time']);
|
||||||
$endTime = strtotime($where['end_time']);
|
$endTime = strtotime($where['end_time']);
|
||||||
$builder->betweenWhere('created_at', $startTime, $endTime);
|
$builder->betweenWhere('create_time', $startTime, $endTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($sort) {
|
switch ($sort) {
|
||||||
|
@ -53,7 +53,7 @@ class CourseDocument extends Component
|
|||||||
'attrs' => $course->attrs,
|
'attrs' => $course->attrs,
|
||||||
'user_count' => $course->user_count,
|
'user_count' => $course->user_count,
|
||||||
'lesson_count' => $course->lesson_count,
|
'lesson_count' => $course->lesson_count,
|
||||||
'created_at' => $course->created_at,
|
'create_time' => $course->create_time,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ class CommentList extends Service
|
|||||||
'agree_count' => $comment['agree_count'],
|
'agree_count' => $comment['agree_count'],
|
||||||
'oppose_count' => $comment['oppose_count'],
|
'oppose_count' => $comment['oppose_count'],
|
||||||
'reply_count' => $comment['reply_count'],
|
'reply_count' => $comment['reply_count'],
|
||||||
'created_at' => $comment['created_at'],
|
'create_time' => $comment['create_time'],
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
'me' => $me,
|
'me' => $me,
|
||||||
];
|
];
|
||||||
|
@ -84,7 +84,7 @@ class ConsultList extends Service
|
|||||||
'answer' => $consult['answer'],
|
'answer' => $consult['answer'],
|
||||||
'agree_count' => $consult['agree_count'],
|
'agree_count' => $consult['agree_count'],
|
||||||
'oppose_count' => $consult['oppose_count'],
|
'oppose_count' => $consult['oppose_count'],
|
||||||
'created_at' => $consult['created_at'],
|
'create_time' => $consult['create_time'],
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
'me' => $me,
|
'me' => $me,
|
||||||
];
|
];
|
||||||
|
@ -83,7 +83,7 @@ class ReviewList extends Service
|
|||||||
'content' => $review['content'],
|
'content' => $review['content'],
|
||||||
'agree_count' => $review['agree_count'],
|
'agree_count' => $review['agree_count'],
|
||||||
'oppose_count' => $review['oppose_count'],
|
'oppose_count' => $review['oppose_count'],
|
||||||
'created_at' => $review['created_at'],
|
'create_time' => $review['create_time'],
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
'me' => $me,
|
'me' => $me,
|
||||||
];
|
];
|
||||||
|
@ -59,7 +59,7 @@ class ConsultList extends Service
|
|||||||
'answer' => $consult['answer'],
|
'answer' => $consult['answer'],
|
||||||
'agree_count' => $consult['agree_count'],
|
'agree_count' => $consult['agree_count'],
|
||||||
'oppose_count' => $consult['oppose_count'],
|
'oppose_count' => $consult['oppose_count'],
|
||||||
'created_at' => $consult['created_at'],
|
'create_time' => $consult['create_time'],
|
||||||
'course' => $course,
|
'course' => $course,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ class OrderList extends Service
|
|||||||
'item_info' => $order['item_info'],
|
'item_info' => $order['item_info'],
|
||||||
'source_type' => $order['source_type'],
|
'source_type' => $order['source_type'],
|
||||||
'status' => $order['status'],
|
'status' => $order['status'],
|
||||||
'created_at' => $order['created_at'],
|
'create_time' => $order['create_time'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class RefundList extends Service
|
|||||||
'status' => $refund['status'],
|
'status' => $refund['status'],
|
||||||
'apply_note' => $refund['apply_note'],
|
'apply_note' => $refund['apply_note'],
|
||||||
'review_note' => $refund['review_note'],
|
'review_note' => $refund['review_note'],
|
||||||
'created_at' => (int)$refund['created_at'],
|
'create_time' => (int)$refund['create_time'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ class OrderCreate extends Service
|
|||||||
if ($order) {
|
if ($order) {
|
||||||
|
|
||||||
$caseA = $order->status == OrderModel::STATUS_PENDING;
|
$caseA = $order->status == OrderModel::STATUS_PENDING;
|
||||||
$caseB = time() - $order->created_at < 6 * 3600;
|
$caseB = time() - $order->create_time < 6 * 3600;
|
||||||
|
|
||||||
if ($caseA && $caseB) {
|
if ($caseA && $caseB) {
|
||||||
return $order;
|
return $order;
|
||||||
|
@ -36,7 +36,7 @@ class OrderInfo extends Service
|
|||||||
'item_id' => $order->item_id,
|
'item_id' => $order->item_id,
|
||||||
'item_type' => $order->item_type,
|
'item_type' => $order->item_type,
|
||||||
'item_info' => $order->item_info,
|
'item_info' => $order->item_info,
|
||||||
'created_at' => $order->created_at,
|
'create_time' => $order->create_time,
|
||||||
];
|
];
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
@ -46,7 +46,7 @@ class Refund extends Service
|
|||||||
$userId = $order->user_id;
|
$userId = $order->user_id;
|
||||||
$amount = $order->amount;
|
$amount = $order->amount;
|
||||||
|
|
||||||
$expireTime = strtotime("+{$course['expiry']} days", $order->created_at);
|
$expireTime = strtotime("+{$course['expiry']} days", $order->create_time);
|
||||||
|
|
||||||
$refundAmount = 0.00;
|
$refundAmount = 0.00;
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ class Refund extends Service
|
|||||||
*/
|
*/
|
||||||
foreach ($courses as $course) {
|
foreach ($courses as $course) {
|
||||||
|
|
||||||
$expireTime = strtotime("+{$course['expiry']} days", $order->created_at);
|
$expireTime = strtotime("+{$course['expiry']} days", $order->create_time);
|
||||||
|
|
||||||
if ($expireTime > time()) {
|
if ($expireTime > time()) {
|
||||||
$pricePercent = round($course['market_price'] / $totalMarketPrice, 4);
|
$pricePercent = round($course['market_price'] / $totalMarketPrice, 4);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user