24 lines
677 B
Go
24 lines
677 B
Go
package entities
|
|
|
|
import (
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type MCategoryEntity struct {
|
|
ID uuid.UUID `gorm:"type:uuid;primary_key;default:uuid_generate_v4()" json:"id"`
|
|
Name string `gorm:"type:varchar(100);not null;" json:"name"`
|
|
SearchKey string `gorm:"type:varchar(100);not null;" json:"search_key"`
|
|
Description string `gorm:"type:text" json:"description"`
|
|
IsActive bool `gorm:"type:boolean;default:true" json:"is_active"`
|
|
|
|
ClientID uuid.UUID `gorm:"type:uuid;index;" json:"client_id"`
|
|
|
|
Client M_Client `gorm:"foreignKey:ClientID;references:ID"`
|
|
|
|
FullAuditTrail
|
|
}
|
|
|
|
func (MCategoryEntity) TableName() string {
|
|
return "m_categories"
|
|
}
|