mirror of
https://github.com/yusufipk/RepoHub.git
synced 2026-09-11 18:46:07 +00:00
feat: add PostgreSQL database support and development scripts
- Added pg and @types/pg dependencies for PostgreSQL integration - Created database testing and backend initialization scripts - Changed dev server port to 3002 to avoid conflicts
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
export interface Package {
|
||||
id: string
|
||||
name: string
|
||||
description?: string
|
||||
version?: string
|
||||
platform_id: string
|
||||
category_id?: number
|
||||
license_id?: number
|
||||
type?: 'gui' | 'cli'
|
||||
repository?: 'official' | 'third-party'
|
||||
homepage_url?: string
|
||||
download_url?: string
|
||||
last_updated?: Date
|
||||
downloads_count?: number
|
||||
popularity_score?: number
|
||||
is_active: boolean
|
||||
created_at: Date
|
||||
updated_at: Date
|
||||
|
||||
// Joined fields
|
||||
platform?: Platform
|
||||
category?: Category
|
||||
license?: License
|
||||
tags?: string[]
|
||||
dependencies?: Package[]
|
||||
}
|
||||
|
||||
export interface Platform {
|
||||
id: string
|
||||
name: string
|
||||
package_manager: string
|
||||
icon?: string
|
||||
}
|
||||
|
||||
export interface Category {
|
||||
id: number
|
||||
name: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
export interface License {
|
||||
id: number
|
||||
name: string
|
||||
url?: string
|
||||
}
|
||||
|
||||
export interface CreatePackageInput {
|
||||
id: string
|
||||
name: string
|
||||
description?: string
|
||||
version?: string
|
||||
platform_id: string
|
||||
category_id?: number
|
||||
license_id?: number
|
||||
type?: 'gui' | 'cli'
|
||||
repository?: 'official' | 'third-party'
|
||||
homepage_url?: string
|
||||
download_url?: string
|
||||
popularity_score?: number
|
||||
}
|
||||
|
||||
export interface UpdatePackageInput {
|
||||
name?: string
|
||||
description?: string
|
||||
version?: string
|
||||
category_id?: number
|
||||
license_id?: number
|
||||
type?: 'gui' | 'cli'
|
||||
repository?: 'official' | 'third-party'
|
||||
homepage_url?: string
|
||||
download_url?: string
|
||||
popularity_score?: number
|
||||
is_active?: boolean
|
||||
}
|
||||
|
||||
export interface PackageFilter {
|
||||
platform_id?: string
|
||||
category_id?: number
|
||||
type?: 'gui' | 'cli'
|
||||
repository?: 'official' | 'third-party'
|
||||
search?: string
|
||||
limit?: number
|
||||
offset?: number
|
||||
sort_by?: 'name' | 'popularity_score' | 'last_updated' | 'downloads_count'
|
||||
sort_order?: 'asc' | 'desc'
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
export interface Platform {
|
||||
id: string
|
||||
name: string
|
||||
package_manager: string
|
||||
icon?: string
|
||||
created_at: Date
|
||||
updated_at: Date
|
||||
}
|
||||
|
||||
export interface CreatePlatformInput {
|
||||
id: string
|
||||
name: string
|
||||
package_manager: string
|
||||
icon?: string
|
||||
}
|
||||
|
||||
export interface UpdatePlatformInput {
|
||||
name?: string
|
||||
package_manager?: string
|
||||
icon?: string
|
||||
}
|
||||
Reference in New Issue
Block a user