-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(buddy-system): refactored to standalone model for request matche…
…s WIP
- Loading branch information
1 parent
4eb60b5
commit 0ec4069
Showing
15 changed files
with
187 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
fiesta/apps/buddy_system/migrations/0021_remove_buddyrequest_issuer_note_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Generated by Django 4.2.4 on 2023-09-24 19:17 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import django_extensions.db.fields | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('buddy_system', '0020_rename_description_buddyrequest_issuer_note'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='buddyrequest', | ||
name='issuer_note', | ||
), | ||
migrations.RemoveField( | ||
model_name='buddyrequest', | ||
name='matched_at', | ||
), | ||
migrations.RemoveField( | ||
model_name='buddyrequest', | ||
name='matched_by', | ||
), | ||
migrations.AddField( | ||
model_name='buddyrequest', | ||
name='note', | ||
field=models.TextField(default='', verbose_name='text from issuer'), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name='buddysystemconfiguration', | ||
name='enable_note_from_matcher', | ||
field=models.BooleanField(default=True, help_text='Allows matcher to reply with custom notes to the request issuer'), | ||
), | ||
migrations.CreateModel( | ||
name='BuddyRequestMatch', | ||
fields=[ | ||
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name='modified')), | ||
('note', models.TextField(blank=True, verbose_name='text from matcher')), | ||
('matcher', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, related_name='buddy_system_request_matches', to=settings.AUTH_USER_MODEL, verbose_name='matched by')), | ||
('request', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='match', to='buddy_system.buddyrequest', verbose_name='request')), | ||
], | ||
options={ | ||
'verbose_name': 'buddy request match', | ||
'verbose_name_plural': 'buddy request matches', | ||
'ordering': ('-created',), | ||
'get_latest_by': 'modified', | ||
'abstract': False, | ||
}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
from __future__ import annotations | ||
|
||
from .configuration import BuddySystemConfiguration | ||
from .request import BuddyRequest | ||
from .request import BuddyRequest, BuddyRequestMatch | ||
|
||
__all__ = [ | ||
"BuddySystemConfiguration", | ||
"BuddyRequest", | ||
"BuddyRequestMatch", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.