package data

import (
	"time"
)

func (r *Request) ToRequestData() *RequestData {
	return &RequestData{
		Url:            r.Url,
		Reverse:        r.Reverse,
		IpSrc:          r.IpSrc,
		IpDst:          r.IpDst,
		PortSrc:        r.PortSrc,
		PortDst:        r.PortDst,
		TcpSeq:         r.TcpSeq,
		CreatedAt:      time.Unix(0, r.CreatedAt),
		XForwardedFor:  r.XForwardedFor,
		XRealIP:        r.XRealIP,
		Method:         r.Method,
		Origin:         r.Origin,
		Referer:        r.Referer,
		UserAgent:      r.UserAgent,
		Source:         r.Source,
		Host:           r.Host,
		Protocol:       r.Protocol,
		Connection:     r.Connection,
		XRequestedWith: r.XRequestedWith,
		AcceptEncoding: r.AcceptEncoding,
		AcceptLanguage: r.AcceptLanguage,
		Accept:         r.Accept,
		Cookie:         r.Cookie,
		Via:            r.Via,
		Customer:       r.Customer,
	}
}
