mirror of
https://github.com/spliit-app/spliit.git
synced 2026-02-27 18:06:12 +01:00
Add Expense Date (#26)
* add expense date * Improve date formatting * Prettier * Change field description --------- Co-authored-by: Sebastien Castiel <sebastien@castiel.me>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "Expense" ADD COLUMN "expenseDate" DATE NOT NULL DEFAULT CURRENT_DATE;
|
||||
@@ -32,6 +32,7 @@ model Participant {
|
||||
model Expense {
|
||||
id String @id
|
||||
group Group @relation(fields: [groupId], references: [id], onDelete: Cascade)
|
||||
expenseDate DateTime @db.Date @default(dbgenerated("CURRENT_DATE"))
|
||||
title String
|
||||
amount Int
|
||||
paidBy Participant @relation(fields: [paidById], references: [id], onDelete: Cascade)
|
||||
|
||||
Reference in New Issue
Block a user