Add account hierarchy framework with migrations, RLS policies, and UI components
This commit is contained in:
@@ -1,12 +1,20 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
export const MembershipStatusEnum = z.enum([
|
||||
'active', 'inactive', 'pending', 'resigned', 'excluded', 'deceased',
|
||||
'active',
|
||||
'inactive',
|
||||
'pending',
|
||||
'resigned',
|
||||
'excluded',
|
||||
'deceased',
|
||||
]);
|
||||
export type MembershipStatus = z.infer<typeof MembershipStatusEnum>;
|
||||
|
||||
export const SepaMandateStatusEnum = z.enum([
|
||||
'active', 'pending', 'revoked', 'expired',
|
||||
'active',
|
||||
'pending',
|
||||
'revoked',
|
||||
'expired',
|
||||
]);
|
||||
|
||||
export const CreateMemberSchema = z.object({
|
||||
@@ -78,7 +86,9 @@ export const CreateDuesCategorySchema = z.object({
|
||||
name: z.string().min(1).max(128),
|
||||
description: z.string().optional(),
|
||||
amount: z.number().min(0),
|
||||
interval: z.enum(['monthly', 'quarterly', 'half_yearly', 'yearly']).default('yearly'),
|
||||
interval: z
|
||||
.enum(['monthly', 'quarterly', 'half_yearly', 'yearly'])
|
||||
.default('yearly'),
|
||||
isDefault: z.boolean().default(false),
|
||||
isYouth: z.boolean().default(false),
|
||||
isExit: z.boolean().default(false),
|
||||
@@ -130,7 +140,9 @@ export const UpdateDuesCategorySchema = z.object({
|
||||
name: z.string().min(1).optional(),
|
||||
description: z.string().optional(),
|
||||
amount: z.number().min(0).optional(),
|
||||
interval: z.enum(['monthly', 'quarterly', 'half_yearly', 'yearly']).optional(),
|
||||
interval: z
|
||||
.enum(['monthly', 'quarterly', 'half_yearly', 'yearly'])
|
||||
.optional(),
|
||||
isDefault: z.boolean().optional(),
|
||||
});
|
||||
export type UpdateDuesCategoryInput = z.infer<typeof UpdateDuesCategorySchema>;
|
||||
|
||||
Reference in New Issue
Block a user