You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.1 KiB
46 lines
1.1 KiB
/**
|
|
* 系统操作日志表模型
|
|
*/
|
|
|
|
const OperationLog = {
|
|
/**
|
|
* 模型字段定义
|
|
*/
|
|
fields: {
|
|
id: 'number',
|
|
uuid: 'string',
|
|
tenant_id: 'string',
|
|
table_name: 'string',
|
|
data_id: 'number',
|
|
oper_type: 'number',
|
|
oper_content: 'string',
|
|
oper_by: 'string',
|
|
oper_time: 'date',
|
|
remark: 'string',
|
|
ip: 'string'
|
|
},
|
|
|
|
/**
|
|
* 创建操作日志实例
|
|
* @param {Object} data - 数据对象
|
|
* @returns {Object} - 操作日志实例
|
|
*/
|
|
create: function(data) {
|
|
return {
|
|
id: data.id || null,
|
|
uuid: data.uuid || '',
|
|
tenant_id: data.tenant_id || '',
|
|
table_name: data.table_name || '',
|
|
data_id: data.data_id || 0,
|
|
oper_type: data.oper_type || 0,
|
|
oper_content: data.oper_content || '',
|
|
oper_by: data.oper_by || '',
|
|
oper_time: data.oper_time || new Date(),
|
|
remark: data.remark || '',
|
|
ip: data.ip || null
|
|
};
|
|
}
|
|
};
|
|
|
|
// 导出为全局变量
|
|
window.OperationLog = OperationLog;
|