package dto

// PriceHistoryResponse 成本价历史响应
type PriceHistoryResponse struct {
	ID            uint   `json:"id" description:"历史记录ID"`
	AllocationID  uint   `json:"allocation_id" description:"关联的套餐分配ID"`
	OldCostPrice  int64  `json:"old_cost_price" description:"原成本价（分）"`
	NewCostPrice  int64  `json:"new_cost_price" description:"新成本价（分）"`
	ChangeReason  string `json:"change_reason" description:"变更原因"`
	ChangedBy     uint   `json:"changed_by" description:"变更人ID"`
	ChangedByName string `json:"changed_by_name" description:"变更人姓名"`
	EffectiveFrom string `json:"effective_from" description:"生效时间"`
	CreatedAt     string `json:"created_at" description:"创建时间"`
}

// PriceHistoryListRequest 成本价历史列表请求
type PriceHistoryListRequest struct {
	Page         int   `json:"page" query:"page" validate:"omitempty,min=1" minimum:"1" description:"页码"`
	PageSize     int   `json:"page_size" query:"page_size" validate:"omitempty,min=1,max=100" minimum:"1" maximum:"100" description:"每页数量"`
	AllocationID *uint `json:"allocation_id" query:"allocation_id" validate:"omitempty" description:"套餐分配ID"`
}

// PriceHistoryPageResult 成本价历史分页结果
type PriceHistoryPageResult struct {
	List     []*PriceHistoryResponse `json:"items" description:"历史记录列表"`
	Total    int64                   `json:"total" description:"总数"`
	Page     int                     `json:"page" description:"当前页"`
	PageSize int                     `json:"size" description:"每页数量"`
}
