mirror of
https://github.com/IT4Change/gradido.git
synced 2026-03-01 12:44:43 +00:00
move enums into db which are used for seeding
This commit is contained in:
parent
0e6929b946
commit
5370218dc9
@ -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
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -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',
|
||||
|
||||
22
database/src/enum/ContributionCycleType.ts
Normal file
22
database/src/enum/ContributionCycleType.ts
Normal 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',
|
||||
}
|
||||
7
database/src/enum/ContributionStatus.ts
Normal file
7
database/src/enum/ContributionStatus.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export enum ContributionStatus {
|
||||
PENDING = 'PENDING',
|
||||
DELETED = 'DELETED',
|
||||
IN_PROGRESS = 'IN_PROGRESS',
|
||||
DENIED = 'DENIED',
|
||||
CONFIRMED = 'CONFIRMED',
|
||||
}
|
||||
5
database/src/enum/ContributionType.ts
Normal file
5
database/src/enum/ContributionType.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export enum ContributionType {
|
||||
ADMIN = 'ADMIN',
|
||||
USER = 'USER',
|
||||
LINK = 'LINK',
|
||||
}
|
||||
8
database/src/enum/TransactionTypeId.ts
Normal file
8
database/src/enum/TransactionTypeId.ts
Normal 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,
|
||||
}
|
||||
@ -1 +1,5 @@
|
||||
export * from './CommunityHandshakeStateType'
|
||||
export * from './CommunityHandshakeStateType'
|
||||
export * from './ContributionType'
|
||||
export * from './ContributionStatus'
|
||||
export * from './TransactionTypeId'
|
||||
export * from './ContributionCycleType'
|
||||
Loading…
x
Reference in New Issue
Block a user