kae_mihara e3f6fa236d
feat:improve product yarn ratio workflow (#5)
* feat: support product yarn batches

* feat: improve product yarn ratio workflow

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-05 08:06:28 +09:00

27 lines
565 B
Go

package yarn
import (
"muyu-apiserver/gateway/internal/types"
"muyu-apiserver/rpc/inventory/pb"
)
func yarnInfoFromPB(y *pb.YarnInfo) types.YarnInfo {
if y == nil {
return types.YarnInfo{}
}
return types.YarnInfo{
YarnId: y.YarnId,
YarnName: y.YarnName,
Color: y.Color,
WeightGM: y.WeightGM,
SupplierId: y.SupplierId,
SupplierName: y.SupplierName,
DyeFactory: y.DyeFactory,
ImageUrl: y.ImageUrl,
Remark: y.Remark,
Status: y.Status,
CreatedAt: y.CreatedAt,
UpdatedAt: y.UpdatedAt,
}
}