1234567891011121314151617181920212223242526272829 |
- 'use strict';
- /**
- * 登录日志-数据模型
- *
- * @author lanjianrong
- * @date 2020/8/31
- * @version
- */
- module.exports = app => {
- class LoginLogging extends app.BaseService {
- constructor(ctx) {
- super(ctx);
- this.tableName = 'login_logging';
- }
- async addLoginLog()
- /**
- * 创建记录
- * @param {Object} payload - 载荷
- */
- async create(payload) {
- const result = this.db.insert(this.tableName, payload);
- return result && result.affectedRows > 1;
- }
- }
- return LoginLogging;
- };
|