move enums into db which are used for seeding

This commit is contained in:
einhornimmond 2025-11-28 18:58:08 +01:00
parent 0e6929b946
commit 5370218dc9
8 changed files with 50 additions and 38 deletions

View File

@ -1,27 +1,5 @@
import { registerEnumType } from 'type-graphql'
// lowercase values are not implemented yet
export enum ContributionCycleType {
ONCE = 'ONCE',
HOUR = 'hour',
TWO_HOURS = 'two_hours',
FOUR_HOURS = 'four_hours',
EIGHT_HOURS = 'eight_hours',
HALF_DAY = 'half_day',
DAILY = 'DAILY',
TWO_DAYS = 'two_days',
THREE_DAYS = 'three_days',
FOUR_DAYS = 'four_days',
FIVE_DAYS = 'five_days',
SIX_DAYS = 'six_days',
WEEK = 'week',
TWO_WEEKS = 'two_weeks',
MONTH = 'month',
TWO_MONTH = 'two_month',
QUARTER = 'quarter',
HALF_YEAR = 'half_year',
YEAR = 'year',
}
import { ContributionCycleType } from 'database'
registerEnumType(ContributionCycleType, {
name: 'ContributionCycleType', // this one is mandatory

View File

@ -1,12 +1,5 @@
import { registerEnumType } from 'type-graphql'
export enum ContributionStatus {
PENDING = 'PENDING',
DELETED = 'DELETED',
IN_PROGRESS = 'IN_PROGRESS',
DENIED = 'DENIED',
CONFIRMED = 'CONFIRMED',
}
import { ContributionStatus } from 'database'
registerEnumType(ContributionStatus, {
name: 'ContributionStatus',

View File

@ -1,10 +1,5 @@
import { registerEnumType } from 'type-graphql'
export enum ContributionType {
ADMIN = 'ADMIN',
USER = 'USER',
LINK = 'LINK',
}
import { ContributionType } from 'database'
registerEnumType(ContributionType, {
name: 'ContributionType',

View File

@ -0,0 +1,22 @@
// lowercase values are not implemented yet
export enum ContributionCycleType {
ONCE = 'ONCE',
HOUR = 'hour',
TWO_HOURS = 'two_hours',
FOUR_HOURS = 'four_hours',
EIGHT_HOURS = 'eight_hours',
HALF_DAY = 'half_day',
DAILY = 'DAILY',
TWO_DAYS = 'two_days',
THREE_DAYS = 'three_days',
FOUR_DAYS = 'four_days',
FIVE_DAYS = 'five_days',
SIX_DAYS = 'six_days',
WEEK = 'week',
TWO_WEEKS = 'two_weeks',
MONTH = 'month',
TWO_MONTH = 'two_month',
QUARTER = 'quarter',
HALF_YEAR = 'half_year',
YEAR = 'year',
}

View File

@ -0,0 +1,7 @@
export enum ContributionStatus {
PENDING = 'PENDING',
DELETED = 'DELETED',
IN_PROGRESS = 'IN_PROGRESS',
DENIED = 'DENIED',
CONFIRMED = 'CONFIRMED',
}

View File

@ -0,0 +1,5 @@
export enum ContributionType {
ADMIN = 'ADMIN',
USER = 'USER',
LINK = 'LINK',
}

View File

@ -0,0 +1,8 @@
export enum TransactionTypeId {
CREATION = 1,
SEND = 2,
RECEIVE = 3,
// This is a virtual property, never occurring on the database
DECAY = 4,
LINK_SUMMARY = 5,
}

View File

@ -1 +1,5 @@
export * from './CommunityHandshakeStateType'
export * from './CommunityHandshakeStateType'
export * from './ContributionType'
export * from './ContributionStatus'
export * from './TransactionTypeId'
export * from './ContributionCycleType'