42 lines
1.2 KiB
Go
Raw Normal View History

2025-07-18 20:10:29 +07:00
package models
import (
"apskel-pos-be/internal/constants"
"time"
"github.com/google/uuid"
)
type Outlet struct {
ID uuid.UUID
OrganizationID uuid.UUID
Name string
Address string
PhoneNumber *string
BusinessType constants.BusinessType
Currency constants.Currency
TaxRate float64
IsActive bool
CreatedAt time.Time
UpdatedAt time.Time
}
type CreateOutletRequest struct {
OrganizationID uuid.UUID `validate:"required"`
Name string `validate:"required,min=1,max=255"`
Address string `validate:"required,min=1,max=500"`
PhoneNumber *string `validate:"omitempty,e164"`
BusinessType constants.BusinessType `validate:"required"`
Currency constants.Currency `validate:"required"`
TaxRate float64 `validate:"min=0,max=1"`
}
type UpdateOutletRequest struct {
OrganizationID uuid.UUID
Name *string `validate:"omitempty,min=1,max=255"`
Address *string `validate:"omitempty,min=1,max=500"`
PhoneNumber *string `validate:"omitempty,e164"`
TaxRate *float64 `validate:"omitempty,min=0,max=1"`
IsActive *bool
}