func (p *ProxyRsp) CopyFromProxy(proxy *model.Proxy) {
	p.ID = proxy.ID
	p.IP = proxy.IP
	p.Port = proxy.Port
	p.Schema = proxy.Schema
	p.CheckTime = proxy.CheckTime
}
CopyFromProxy proxy to rsp
package api
import (
	"context"
	"proxy-pool/config"
	"proxy-pool/databases"
	"proxy-pool/model"
	"time"
	log "github.com/sirupsen/logrus"
)
type Service struct {
	db   *databases.DB
	conf *config.Config
}
func NewService(db *databases.DB, conf *config.Config) *Service {
	return &Service{
		db:   db,
		conf: conf,
	}
}
type (
	ProxyRsp struct {
		ID        uint64    `gorm:"column:id" json:"id"`
		IP        string    `gorm:"column:ip" json:"ip"`
		Port      int       `gorm:"column:port" json:"port"`
		Schema    string    `gorm:"column:schema" json:"schema"`
		CheckTime time.Time `gorm:"column:check_time" json:"last_check_time"`
	}
)