mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-17 03:10:38 +09:00
Expand data model with companies, approvals, costs, and heartbeats
Add new DB schemas: companies, agent_api_keys, approvals, cost_events, heartbeat_runs, issue_comments. Add corresponding shared types and validators. Update existing schemas (agents, goals, issues, projects) with new fields for company association, budgets, and richer metadata. Generate initial Drizzle migration. Update seed data. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fade29fc3e
commit
8c830eae70
41 changed files with 4464 additions and 121 deletions
19
packages/shared/src/validators/company.ts
Normal file
19
packages/shared/src/validators/company.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { z } from "zod";
|
||||
import { COMPANY_STATUSES } from "../constants.js";
|
||||
|
||||
export const createCompanySchema = z.object({
|
||||
name: z.string().min(1),
|
||||
description: z.string().optional().nullable(),
|
||||
budgetMonthlyCents: z.number().int().nonnegative().optional().default(0),
|
||||
});
|
||||
|
||||
export type CreateCompany = z.infer<typeof createCompanySchema>;
|
||||
|
||||
export const updateCompanySchema = createCompanySchema
|
||||
.partial()
|
||||
.extend({
|
||||
status: z.enum(COMPANY_STATUSES).optional(),
|
||||
spentMonthlyCents: z.number().int().nonnegative().optional(),
|
||||
});
|
||||
|
||||
export type UpdateCompany = z.infer<typeof updateCompanySchema>;
|
||||
Loading…
Add table
Add a link
Reference in a new issue