diff options
| author | Eugen Wissner <belka@caraus.de> | 2025-01-24 22:38:58 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2025-01-24 22:38:58 +0100 |
| commit | 3c430bca64c813a0a04cb98d5cd9a3d3fb70e1b0 (patch) | |
| tree | 2896d05540a33312ee2050ef1919a92085a13e01 /tea-cleaner/TeaCleaner/Types.hs | |
| parent | c8b05eedfc876a6ef09472b5e92ba0455ad0f8b1 (diff) | |
| download | kazbek-3c430bca64c813a0a04cb98d5cd9a3d3fb70e1b0.tar.gz | |
Add gitea spam user cleaning script
Diffstat (limited to 'tea-cleaner/TeaCleaner/Types.hs')
| -rw-r--r-- | tea-cleaner/TeaCleaner/Types.hs | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/tea-cleaner/TeaCleaner/Types.hs b/tea-cleaner/TeaCleaner/Types.hs new file mode 100644 index 0000000..786dedb --- /dev/null +++ b/tea-cleaner/TeaCleaner/Types.hs @@ -0,0 +1,53 @@ +module TeaCleaner.Types + ( Activity(..) + , User(..) + ) where + +import TeaCleaner.Options (jsonOptions) +import Data.Int (Int64) +import Data.Text (Text) +import qualified Data.Aeson.TH as Aeson +import Data.Time (ZonedTime(..)) + +data User = User + { id :: Int64 + , login :: Text + , loginName :: Text + , fullName :: Text + , email :: Text + , avatarUrl :: Text + , language :: Text + , isAdmin :: Bool + , lastLogin :: ZonedTime + , created :: ZonedTime + , restricted :: Bool + , active :: Bool + , prohibitLogin :: Bool + , location :: Text + , website :: Text + , description :: Text + , visibility :: Text + , followersCount :: Int + , followingCount :: Int + , starredReposCount :: Int + , username :: Text + } deriving (Show) + +$(Aeson.deriveJSON jsonOptions ''User) + +data Activity = Activity + { actUserId :: Int64 + -- , comment Comment + , commentId :: Int64 + , content :: Text + , created :: ZonedTime + , id :: Int64 + , isPrivate :: Bool + , opType :: Text + , refName :: Text + -- repo Repository{...} + , repoId :: Int64 + , userId :: Int64 + } deriving (Show) + +$(Aeson.deriveJSON jsonOptions ''Activity) |
