table.go
864 字节
package transform
import (
"gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/infrastructure/pg/models"
)
func TransformToTableDomainModelFromPgModels(tableModel *models.Table) (*domain.Table, error) {
return &domain.Table{
TableId: tableModel.TableId,
TableType: tableModel.TableType,
Name: tableModel.Name,
SQLName: tableModel.SQLName,
ParentId: tableModel.ParentId,
DataFieldIndex: tableModel.DataFieldIndex,
PK: tableModel.PK,
DataFields: tableModel.DataFields,
ManualFields: tableModel.ManualFields,
CreatedAt: tableModel.CreatedAt,
UpdatedAt: tableModel.UpdatedAt,
DeletedAt: tableModel.DeletedAt,
Version: tableModel.Version,
}, nil
}