/**
 * @filename:CustomerOperationLog 2024-05-14
 * @project trade-client V1.0 Copyright(c) 2024 wanglang Co. Ltd. All right reserved.
 */
package com.trade.client.system.domain;

import com.trade.common.core.domain.BizBaseEntity;
import com.trade.common.utils.ip.AddressUtils;
import com.trade.common.utils.ip.IpUtils;
import io.swagger.annotations.ApiModelProperty;

/**
 * @Description: 客户操作日志实体类
 * @version: V1.0
 * @author: wanglang
 * @Date: 2024/5/14
 */
public class CustomerOperationLog extends BizBaseEntity<CustomerOperationLog> {

    private static final long serialVersionUID = 1715656430846L;
    @ApiModelProperty(name = "customerUserId", value = "客户id")
    private Long customerUserId;
    @ApiModelProperty(name = "module", value = "业务模块(菜单)")
    private String module;
    @ApiModelProperty(name = "type", value = "业务类型(新增、修改)")
    private String type;
    @ApiModelProperty(name = "ipaddr", value = "登录IP地址")
    private String ipaddr;
    @ApiModelProperty(name = "content", value = "操作内容")
    private String content;
    @ApiModelProperty(name = "loginLocation", value = "登录地点")
    private String loginLocation;

    public CustomerOperationLog(){
    }

    public CustomerOperationLog(Long customerUserId, String module, String type, String content){
        this.customerUserId = customerUserId;
        this.module = module;
        this.type = type;
        this.ipaddr = IpUtils.getIpAddr();
        this.content = content;
        this.loginLocation = AddressUtils.getRealAddressByIP(this.ipaddr);
    }

    public Long getCustomerUserId() {
        return customerUserId;
    }

    public void setCustomerUserId(Long customerUserId) {
        this.customerUserId = customerUserId;
    }

    public String getModule() {
        return module;
    }

    public void setModule(String module) {
        this.module = module;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getIpaddr() {
        return ipaddr;
    }

    public void setIpaddr(String ipaddr) {
        this.ipaddr = ipaddr;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getLoginLocation() {
        return loginLocation;
    }

    public void setLoginLocation(String loginLocation) {
        this.loginLocation = loginLocation;
    }
}
