product_calendar.go 1.1 KB
package transform

import (
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/domain"
	"gitlab.fjmaimaimai.com/allied-creation/allied-creation-manufacture/pkg/infrastructure/pg/models"
)

func TransformToProductCalendarDomainModelFromPgModels(productCalendarModel *models.ProductCalendar) (*domain.ProductCalendar, error) {
	return &domain.ProductCalendar{
		ProductCalendarId: productCalendarModel.ProductCalendarId,
		CompanyId:         productCalendarModel.CompanyId,
		OrgId:             productCalendarModel.OrgId,
		WorkStation:       productCalendarModel.WorkStation,
		WorkOn:            productCalendarModel.WorkOn,
		CalendarSelected:  productCalendarModel.CalendarSelected,
		InWorkAt:          productCalendarModel.InWorkAt,
		OutWorkAt:         productCalendarModel.OutWorkAt,
		BreakTime:         productCalendarModel.BreakTime,
		WorkTime:          productCalendarModel.WorkTime,
		CreatedAt:         productCalendarModel.CreatedAt,
		UpdatedAt:         productCalendarModel.UpdatedAt,
		DeletedAt:         productCalendarModel.DeletedAt,
		Ext:               productCalendarModel.Ext,
	}, nil
}