Support the ongoing development of Laravel.io →
Database Eloquent Architecture
Last updated 2 years ago.
0

A transaction can either be a debit or a credit not both at the same time.

So, why not this :

Table :  transactions

Schema :
id:increments
amount:decimal(x,y)
type:string or enum with debit / credit)
date:timestamp
timestamps: (for created_at & updated_at);
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

AlexCutts1 alexcutts1 Joined 15 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.