content: {-# LANGUAGE ApplicativeDo #-}
  {-# OPTIONS_GHC -Wno-unused-imports #-}
  
  module Domain.Types.SpecialOccasion where
  
  import Data.Aeson
  import qualified Data.Time
  import qualified Domain.Types.BusinessHour
  import qualified Domain.Types.Merchant
  import qualified Domain.Types.MerchantOperatingCity
  import Kernel.Prelude
  import qualified Kernel.Types.Id
  import qualified Tools.Beam.UtilsTH
  
  data SpecialOccasion = SpecialOccasion
    { businessHours :: [Kernel.Types.Id.Id Domain.Types.BusinessHour.BusinessHour],
      date :: Kernel.Prelude.Maybe Data.Time.Day,
      dayOfWeek :: Kernel.Prelude.Maybe Kernel.Prelude.Text,
      description :: Kernel.Prelude.Maybe Kernel.Prelude.Text,
      entityId :: Kernel.Prelude.Text,
      id :: Kernel.Types.Id.Id Domain.Types.SpecialOccasion.SpecialOccasion,
      name :: Kernel.Prelude.Maybe Kernel.Prelude.Text,
      placeId :: Kernel.Prelude.Maybe Kernel.Prelude.Text,
      specialDayType :: Domain.Types.SpecialOccasion.SpecialDayType,
      merchantId :: Kernel.Prelude.Maybe (Kernel.Types.Id.Id Domain.Types.Merchant.Merchant),
      merchantOperatingCityId :: Kernel.Prelude.Maybe (Kernel.Types.Id.Id Domain.Types.MerchantOperatingCity.MerchantOperatingCity),
      createdAt :: Kernel.Prelude.UTCTime,
      updatedAt :: Kernel.Prelude.UTCTime
    }
    deriving (Generic, Show, ToJSON, FromJSON, ToSchema)
  
  data SpecialDayType = Open | Closed deriving (Eq, Ord, Show, Read, Generic, ToJSON, FromJSON, ToSchema)
  
  $(Tools.Beam.UtilsTH.mkBeamInstancesForEnumAndList ''SpecialDayType)
  