package example

import "time"

// CustomerInfo 客户信息
type CustomerInfo struct {
	ID                 uint      `json:"ID"`
	CustomerName       string    `json:"customerName"`
	CustomerPhoneData  string    `json:"customerPhoneData"`
	SysUserID          uint      `json:"sysUserId"`
	SysUserAuthorityID uint      `json:"sysUserAuthorityId"`
	CreatedAt          time.Time `json:"createdAt"`
}

// CreateCustomerRequest 创建客户请求
type CreateCustomerRequest struct {
	CustomerName       string `json:"customerName" binding:"required"`
	CustomerPhoneData  string `json:"customerPhoneData"`
	SysUserID          uint   `json:"sysUserId"`
	SysUserAuthorityID uint   `json:"sysUserAuthorityId"`
}

// UpdateCustomerRequest 更新客户请求
type UpdateCustomerRequest struct {
	ID                 uint   `json:"ID" binding:"required"`
	CustomerName       string `json:"customerName"`
	CustomerPhoneData  string `json:"customerPhoneData"`
	SysUserID          uint   `json:"sysUserId"`
	SysUserAuthorityID uint   `json:"sysUserAuthorityId"`
}

// GetCustomerListRequest 获取客户列表请求
type GetCustomerListRequest struct {
	Page         int    `json:"page" form:"page"`
	PageSize     int    `json:"pageSize" form:"pageSize"`
	CustomerName string `json:"customerName" form:"customerName"`
}

// GetCustomerListReply 获取客户列表响应
type GetCustomerListReply struct {
	List     []CustomerInfo `json:"list"`
	Total    int64          `json:"total"`
	Page     int            `json:"page"`
	PageSize int            `json:"pageSize"`
}

// CustomerResponse 客户响应
type CustomerResponse struct {
	Customer CustomerInfo `json:"customer"`
}
