mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-31 12:13:40 +00:00
refactor registry to include OS version filtering on the package index (#64)
* refactor registry to include OS version filtering on the package index * remove commented code, clean up tests * removed unused types * remove disabled test * remove unused type * fix query parsing * remove unused code * more purging * MOAR PURGING * normalize data model, fix all type errors * rename get parameter
This commit is contained in:
32
src/Model.hs
32
src/Model.hs
@@ -1,4 +1,6 @@
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE DerivingStrategies #-}
|
||||
{-# LANGUAGE DeriveGeneric #-}
|
||||
{-# LANGUAGE GADTs #-}
|
||||
{-# LANGUAGE MultiParamTypeClasses #-}
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
@@ -6,7 +8,6 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-# LANGUAGE TypeFamilies #-}
|
||||
{-# LANGUAGE UndecidableInstances #-}
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
|
||||
module Model where
|
||||
|
||||
@@ -18,44 +19,42 @@ import Orphans.Emver ( )
|
||||
import Startlude
|
||||
|
||||
share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistLowerCase|
|
||||
SApp
|
||||
PkgRecord
|
||||
Id PkgId sql=pkg_id
|
||||
createdAt UTCTime
|
||||
updatedAt UTCTime Maybe
|
||||
title Text
|
||||
appId PkgId
|
||||
descShort Text
|
||||
descLong Text
|
||||
iconType Text
|
||||
UniqueAppId appId
|
||||
deriving Eq
|
||||
deriving Show
|
||||
|
||||
SVersion sql=version
|
||||
VersionRecord sql=version
|
||||
createdAt UTCTime
|
||||
updatedAt UTCTime Maybe
|
||||
appId SAppId
|
||||
pkgId PkgRecordId
|
||||
number Version
|
||||
releaseNotes Text
|
||||
osVersionRequired VersionRange default='*'
|
||||
osVersionRecommended VersionRange default='*'
|
||||
osVersion Version
|
||||
arch Text Maybe
|
||||
UniqueBin appId number
|
||||
Primary pkgId number
|
||||
deriving Eq
|
||||
deriving Show
|
||||
|
||||
OsVersion
|
||||
OsVersion
|
||||
createdAt UTCTime
|
||||
updatedAt UTCTime
|
||||
number Version
|
||||
headline Text
|
||||
releaseNotes Text
|
||||
releaseNotes Text
|
||||
deriving Eq
|
||||
deriving Show
|
||||
|
||||
Metric
|
||||
createdAt UTCTime
|
||||
appId SAppId
|
||||
version SVersionId
|
||||
pkgId PkgRecordId
|
||||
version VersionRecordId
|
||||
deriving Eq
|
||||
deriving Show
|
||||
|
||||
@@ -69,13 +68,10 @@ Category
|
||||
deriving Eq
|
||||
deriving Show
|
||||
|
||||
ServiceCategory
|
||||
PkgCategory
|
||||
createdAt UTCTime
|
||||
serviceId SAppId
|
||||
pkgId PkgRecordId
|
||||
categoryId CategoryId
|
||||
serviceName Text -- SAppAppId
|
||||
categoryName CategoryTitle -- CategoryTitle
|
||||
priority Int Maybe
|
||||
deriving Eq
|
||||
deriving Show
|
||||
|]
|
||||
|
||||
Reference in New Issue
Block a user