<commit_before>{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}

module User.Types
  ( module User.Types
  , module User.Enums
  ) where

import Database.Persist.TH
import Servant
import Data.Time
import Data.Text (unpack)
import Data.ByteString.Char8 (ByteString, pack)
import Control.Monad.Except
import User.Enums

share [ mkPersist sqlSettings,
        mkMigrate "migrateUser",
        mkDeleteCascade sqlSettings ]
  [persistLowerCase|
    User
      name          String
      hash          ByteString
    Role
      user          UserId<commit_msg>Unique usernames<commit_after>{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}

module User.Types
  ( module User.Types
  , module User.Enums
  ) where

import Database.Persist.TH
import Servant
import Data.Time
import Data.Text (unpack)
import Data.ByteString.Char8 (ByteString, pack)
import Control.Monad.Except
import User.Enums

share [ mkPersist sqlSettings,
        mkMigrate "migrateUser",
        mkDeleteCascade sqlSettings ]
  [persistLowerCase|
    User
      name          String
      hash          ByteString
      UniqueName name
    Role
      user          UserId
{'fraction_non_alphanumeric': 0.10044500953591863, 'fraction_numerical': 0.0012714558169103624, 'mean_word_length': 3.164021164021164, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2709397', 'n_tokens_mistral': 535, 'n_tokens_neox': 528, 'n_words': 116}