|
1 | | -# -*- coding: utf-8 -*- |
2 | | -from __future__ import unicode_literals |
| 1 | +# Generated by Django 6.0.7 on 2026-08-01 13:45 |
3 | 2 |
|
4 | | -from django.db import models, migrations |
| 3 | +import django.db.models.deletion |
| 4 | +import markdownx.models |
5 | 5 | import taggit.managers |
6 | 6 | from django.conf import settings |
7 | | -from markdownx import models as mdx_models |
| 7 | +from django.db import migrations, models |
8 | 8 |
|
9 | 9 |
|
10 | 10 | class Migration(migrations.Migration): |
11 | 11 |
|
| 12 | + initial = True |
| 13 | + |
12 | 14 | dependencies = [ |
| 15 | + ('taggit', '0006_rename_taggeditem_content_type_object_id_taggit_tagg_content_8fc721_idx'), |
13 | 16 | migrations.swappable_dependency(settings.AUTH_USER_MODEL), |
14 | | - ('taggit', '0001_initial'), |
15 | 17 | ] |
16 | 18 |
|
17 | 19 | operations = [ |
18 | 20 | migrations.CreateModel( |
19 | 21 | name='Company', |
20 | 22 | fields=[ |
21 | | - ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), |
| 23 | + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
22 | 24 | ('name', models.CharField(max_length=255)), |
23 | | - ('profile', mdx_models.MarkdownxField()), |
| 25 | + ('profile', markdownx.models.MarkdownxField()), |
24 | 26 | ('homepage', models.URLField()), |
25 | 27 | ('created_at', models.DateTimeField(auto_now_add=True)), |
26 | 28 | ('updated_at', models.DateTimeField(auto_now=True)), |
27 | | - ( |
28 | | - 'user', |
29 | | - models.ForeignKey( |
30 | | - to=settings.AUTH_USER_MODEL, |
31 | | - null=True, |
32 | | - on_delete=models.SET_NULL, |
33 | | - ), |
34 | | - ), |
| 29 | + ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='companies', to=settings.AUTH_USER_MODEL)), |
35 | 30 | ], |
36 | 31 | options={ |
37 | 32 | 'verbose_name_plural': 'companies', |
38 | 33 | }, |
39 | | - bases=(models.Model,), |
40 | 34 | ), |
41 | 35 | migrations.CreateModel( |
42 | 36 | name='Job', |
43 | 37 | fields=[ |
44 | | - ('id', models.AutoField(serialize=False, primary_key=True, verbose_name='ID', auto_created=True)), |
| 38 | + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
| 39 | + ('is_approved', models.BooleanField(default=False)), |
| 40 | + ('is_sponsored', models.BooleanField(default=False)), |
45 | 41 | ('title', models.CharField(max_length=255)), |
46 | | - ('description', mdx_models.MarkdownxField()), |
| 42 | + ('description', markdownx.models.MarkdownxField()), |
47 | 43 | ('location', models.CharField(max_length=255)), |
48 | | - ('application_url', models.URLField()), |
| 44 | + ('application_url', models.URLField(blank=True, null=True)), |
| 45 | + ('application_email', models.EmailField(blank=True, max_length=254, null=True)), |
49 | 46 | ('created_at', models.DateTimeField(auto_now_add=True)), |
50 | 47 | ('updated_at', models.DateTimeField(auto_now=True)), |
51 | | - ( |
52 | | - 'company', |
53 | | - models.ForeignKey( |
54 | | - to='jobs.Company', |
55 | | - on_delete=models.CASCADE, |
56 | | - ) |
57 | | - ), |
58 | | - ('tags', taggit.managers.TaggableManager(to='taggit.Tag', help_text='A comma-separated list of tags.', verbose_name='Tags', through='taggit.TaggedItem')), |
59 | | - ( |
60 | | - 'user', |
61 | | - models.ForeignKey( |
62 | | - to=settings.AUTH_USER_MODEL, |
63 | | - on_delete=models.CASCADE, |
64 | | - ), |
65 | | - ), |
| 48 | + ('is_active', models.BooleanField(default=True)), |
| 49 | + ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='jobs', to='jobs.company')), |
| 50 | + ('tags', taggit.managers.TaggableManager(help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')), |
| 51 | + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='jobs', to=settings.AUTH_USER_MODEL)), |
66 | 52 | ], |
67 | | - options={ |
68 | | - }, |
69 | | - bases=(models.Model,), |
70 | 53 | ), |
71 | 54 | ] |
0 commit comments