package models import ( "time" "github.com/google/uuid" ) type Category struct { ID uuid.UUID OrganizationID uuid.UUID OutletID *uuid.UUID Name string Description *string ImageURL *string Order int IsActive bool CreatedAt time.Time UpdatedAt time.Time } type CreateCategoryRequest struct { OrganizationID uuid.UUID `validate:"required"` OutletID *uuid.UUID ParentID *uuid.UUID Name string `validate:"required,min=1,max=255"` Description *string `validate:"omitempty,max=1000"` ImageURL *string `validate:"omitempty,url"` Order int `validate:"min=0"` OwnerFeePercent *float64 `validate:"omitempty,min=0,max=100"` } type UpdateCategoryRequest struct { Name *string `validate:"omitempty,min=1,max=255"` Description *string `validate:"omitempty,max=1000"` ImageURL *string `validate:"omitempty,url"` OutletID *uuid.UUID ParentID *uuid.UUID Order *int `validate:"omitempty,min=0"` OwnerFeePercent *float64 `validate:"omitempty,min=0,max=100"` IsActive *bool // Clear flags remove the value; a nil pointer above only means "leave unchanged" ClearParentID bool ClearOwnerFeePercent bool } type CategoryResponse struct { ID uuid.UUID OrganizationID uuid.UUID OutletID *uuid.UUID ParentID *uuid.UUID ParentName *string Name string Description *string ImageURL *string Order int OwnerFeePercent *float64 IsActive bool CreatedAt time.Time UpdatedAt time.Time }