<commit_before>from django.contrib.auth.models import User
from django.db import models
from django.db.models import fields
from django.utils import timezone


class Transaction(models.Model):
    title = fields.CharField(max_length=255)
    price = fields.DecimalField(max_digits=10, decimal_places=2)
    created = fields.DateTimeField(auto_now=True)
    modified = fields.DateTimeField(default=timezone.now)
    user = models.ForeignKey(User)

    def __str__(self):
        return "{}_{}".format(self.title, self.price)<commit_msg>Use amount and category fields instead of price<commit_after>from django.contrib.auth.models import User
from django.db import models
from django.db.models import fields
from django.utils import timezone


class Transaction(models.Model):
    CATEGORY_CHOICES = (
        (0, 'expense'),
        (1, 'income'),
    )

    title = fields.CharField(max_length=255)
    amount = fields.DecimalField(max_digits=10, decimal_places=2)
    category = fields.CharField(max_length=1, choices=CATEGORY_CHOICES)
    created = fields.DateTimeField(auto_now=True)
    modified = fields.DateTimeField(default=timezone.now)
    user = models.ForeignKey(User)

    def __str__(self):
        return "{}".format(self.title)
{'fraction_non_alphanumeric': 0.10475423045930701, 'fraction_numerical': 0.012087026591458501, 'mean_word_length': 4.447368421052632, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1724392', 'n_tokens_mistral': 385, 'n_tokens_neox': 367, 'n_words': 81}