Files
lti-api/internal/entities/production_standard.go
T
aguhh18 c9633d1308 feat[BE#US386]: add production standards module with CRUD operations
- Created database migration for production standards and related tables.
- Implemented entities for ProductionStandard, ProductionStandardDetail, and StandardGrowthDetail.
- Developed controller for handling production standard requests.
- Added DTOs for data transfer between layers.
- Implemented service layer for business logic related to production standards.
- Created repository interfaces and implementations for data access.
- Added validation for production standard requests.
- Registered routes for production standards in the main application.
2025-12-27 09:02:16 +07:00

20 lines
807 B
Go

package entities
import (
"time"
)
type ProductionStandard struct {
Id uint `gorm:"primaryKey;autoIncrement"`
Name string `gorm:"type:varchar(100);uniqueIndex;not null"`
ProjectCategory string `gorm:"type:varchar(20);not null"`
CreatedAt time.Time `gorm:"type:timestamptz;not null"`
UpdatedAt time.Time `gorm:"type:timestamptz;not null"`
DeletedAt *time.Time `gorm:"type:timestamptz"`
CreatedBy uint `gorm:"not null"`
CreatedUser User `gorm:"foreignKey:CreatedBy;references:Id"`
ProductionStandardDetails []ProductionStandardDetail `gorm:"foreignKey:ProductionStandardId;references:Id"`
StandardGrowthDetails []StandardGrowthDetail `gorm:"foreignKey:ProductionStandardId;references:Id"`
}