Move AttachmentType into Common (separate git repo)
This commit is contained in:
parent
6f139779ea
commit
6485acf12b
|
@ -75,7 +75,7 @@ executable chan-delorean
|
|||
JSONPost
|
||||
JSONCommonTypes
|
||||
Common.PostsType
|
||||
AttachmentType
|
||||
Common.AttachmentType
|
||||
Hash
|
||||
Data.WordUtil
|
||||
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
{-# LANGUAGE DeriveAnyClass #-}
|
||||
module AttachmentType
|
||||
( Attachment (..)
|
||||
, Dimension (..)
|
||||
, Paths (..)
|
||||
) where
|
||||
|
||||
import GHC.Generics
|
||||
import Data.Int (Int64)
|
||||
import Data.Aeson (FromJSON, ToJSON)
|
||||
import Data.Text (Text)
|
||||
import Data.Time.Clock (UTCTime)
|
||||
|
||||
data Dimension = Dimension
|
||||
{ width :: Int
|
||||
, height :: Int
|
||||
} deriving (Show, Generic, FromJSON, ToJSON)
|
||||
|
||||
data Paths = Paths
|
||||
{ file_path :: FilePath
|
||||
, thumbnail_path :: FilePath
|
||||
} deriving (Show)
|
||||
|
||||
data Attachment = Attachment
|
||||
{ mimetype :: Text
|
||||
, creation_time :: UTCTime
|
||||
, sha256_hash :: Text
|
||||
, phash :: Maybe Int64
|
||||
, illegal :: Bool
|
||||
, post_id :: Int64
|
||||
, resolution :: Maybe Dimension
|
||||
, file_extension :: Maybe Text
|
||||
, original_filename :: Maybe Text
|
||||
, file_size_bytes :: Int
|
||||
} deriving (Show, Generic, FromJSON, ToJSON)
|
|
@ -35,7 +35,7 @@ import qualified DataClient as Client
|
|||
import qualified SitesType as Sites
|
||||
import qualified BoardsType as Boards
|
||||
import qualified ThreadType as Threads
|
||||
import qualified AttachmentType as At
|
||||
import qualified Common.AttachmentType as At
|
||||
import qualified Common.PostsType as Posts
|
||||
import qualified Hash as Hash
|
||||
import qualified Data.WordUtil as Words
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 7a1ee2819b34a10566d96faee2e33f8161546399
|
||||
Subproject commit 915d87dd6e5003019b28d3c2e682042a04bf375b
|
|
@ -48,7 +48,7 @@ import qualified JSONSettings as T
|
|||
import qualified SitesType as Sites
|
||||
import qualified BoardsType as Boards
|
||||
import qualified ThreadType as Threads
|
||||
import qualified AttachmentType as Attachments
|
||||
import qualified Common.AttachmentType as Attachments
|
||||
import qualified Common.PostsType as Posts
|
||||
|
||||
data HttpError
|
||||
|
|
Loading…
Reference in New Issue