0002_organizationinvitation.py 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Generated by Django 3.2.7 on 2021-09-29 15:06
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. class Migration(migrations.Migration):
  6. dependencies = [
  7. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  8. (
  9. "organizations_ext",
  10. "0001_squashed_0009_organization_scrub_ip_addresses",
  11. ),
  12. ]
  13. operations = [
  14. migrations.CreateModel(
  15. name="OrganizationInvitation",
  16. fields=[
  17. (
  18. "id",
  19. models.AutoField(
  20. auto_created=True,
  21. primary_key=True,
  22. serialize=False,
  23. verbose_name="ID",
  24. ),
  25. ),
  26. ("guid", models.UUIDField(editable=False)),
  27. (
  28. "invitee_identifier",
  29. models.CharField(
  30. help_text="The contact identifier for the invitee, email, phone number, social media handle, etc.",
  31. max_length=1000,
  32. ),
  33. ),
  34. (
  35. "invited_by",
  36. models.ForeignKey(
  37. on_delete=django.db.models.deletion.CASCADE,
  38. related_name="organizations_ext_organizationinvitation_sent_invitations",
  39. to=settings.AUTH_USER_MODEL,
  40. ),
  41. ),
  42. (
  43. "invitee",
  44. models.ForeignKey(
  45. blank=True,
  46. null=True,
  47. on_delete=django.db.models.deletion.CASCADE,
  48. related_name="organizations_ext_organizationinvitation_invitations",
  49. to=settings.AUTH_USER_MODEL,
  50. ),
  51. ),
  52. (
  53. "organization",
  54. models.ForeignKey(
  55. on_delete=django.db.models.deletion.CASCADE,
  56. related_name="organization_invites",
  57. to="organizations_ext.organization",
  58. ),
  59. ),
  60. ],
  61. options={
  62. "abstract": False,
  63. },
  64. ),
  65. ]