Ejemplo n.º 1
0
class Migration(migrations.Migration):

    dependencies = [
        ('company', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Tovar',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=250, verbose_name='Наименование товара')),
                ('slug', models.CharField(max_length=250, verbose_name='Наименование для ссылки')),
                ('keuw', models.CharField(blank=True, max_length=250, null=True, verbose_name='Ключевые слова')),
                ('desk', models.CharField(blank=True, max_length=250, null=True, verbose_name='Краткое описание')),
                ('img', models.ImageField(blank=True, null=True, upload_to=company.models.upload_to)),
            ],
            options={
                'verbose_name_plural': 'Товары',
                'verbose_name': 'Товар',
            },
        ),
        migrations.AlterModelOptions(
            name='category',
            options={'verbose_name': 'Категория', 'verbose_name_plural': 'Категории'},
        ),
        migrations.AddField(
            model_name='tovar',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Category'),
        ),
    ]
Ejemplo n.º 2
0
class Migration(migrations.Migration):

    dependencies = [
        ('company', '0006_auto_20170927_1238'),
    ]

    operations = [
        migrations.AddField(
            model_name='tblhappyhours',
            name='vendor',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='tblvendor',
            name='cover_photo',
            field=models.FileField(
                blank=True,
                null=True,
                upload_to=company.models.get_vendor_image_path),
        ),
    ]
Ejemplo n.º 3
0
class Migration(migrations.Migration):

    dependencies = [
        ('company', '0031_auto_20210103_2215'),
    ]

    operations = [
        migrations.AlterField(
            model_name='company',
            name='image',
            field=stdimage.models.StdImageField(blank=True, null=True, upload_to=company.models.rename_company_image, verbose_name='Image'),
        ),
        migrations.AlterField(
            model_name='company',
            name='is_customer',
            field=models.BooleanField(default=False, help_text='Do you sell items to this company?', verbose_name='is customer'),
        ),
        migrations.AlterField(
            model_name='company',
            name='is_manufacturer',
            field=models.BooleanField(default=False, help_text='Does this company manufacture parts?', verbose_name='is manufacturer'),
        ),
        migrations.AlterField(
            model_name='company',
            name='is_supplier',
            field=models.BooleanField(default=True, help_text='Do you purchase items from this company?', verbose_name='is supplier'),
        ),
        migrations.AlterField(
            model_name='company',
            name='link',
            field=InvenTree.fields.InvenTreeURLField(blank=True, help_text='Link to external company information', verbose_name='Link'),
        ),
        migrations.AlterField(
            model_name='company',
            name='notes',
            field=markdownx.models.MarkdownxField(blank=True, verbose_name='Notes'),
        ),
        migrations.AlterField(
            model_name='supplierpart',
            name='base_cost',
            field=models.DecimalField(decimal_places=3, default=0, help_text='Minimum charge (e.g. stocking fee)', max_digits=10, validators=[django.core.validators.MinValueValidator(0)], verbose_name='base cost'),
        ),
        migrations.AlterField(
            model_name='supplierpart',
            name='multiple',
            field=models.PositiveIntegerField(default=1, help_text='Order multiple', validators=[django.core.validators.MinValueValidator(1)], verbose_name='multiple'),
        ),
        migrations.AlterField(
            model_name='supplierpart',
            name='packaging',
            field=models.CharField(blank=True, help_text='Part packaging', max_length=50, null=True, verbose_name='Packaging'),
        ),
        migrations.AlterField(
            model_name='supplierpricebreak',
            name='part',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pricebreaks', to='company.SupplierPart', verbose_name='Part'),
        ),
    ]
Ejemplo n.º 4
0
class DummyFlow(models.Model):
    id = models.AutoField(unique=True,
                          primary_key=True,
                          null=False,
                          blank=False)
    transaction = models.ForeignKey('DummyFlowTrans', null=False, blank=False)
    object = models.ForeignKey('object.Objects', null=False, blank=False)
    qty = models.IntegerField()
    objects = BunkerFlowManager()

    # selfrelated = models.ForeignKey('self', to_field='transaction',  default=None, null=True)

    class Meta:
        db_table = 'dummy_flow_clear'
        verbose_name_plural = 'Тестирование / Бункеры поток'

    def __unicode__(self):
        return u'[%s] %s' % (self.id, self.transaction)
Ejemplo n.º 5
0
class DummyCompanies(models.Model):
    name = models.CharField(max_length=255, blank=False, null=False)
    description = models.CharField(max_length=255, blank=True, null=True)
    www = models.CharField(max_length=255, blank=True)
    org_type = models.ForeignKey('company.CompanyOrgTypes',
                                 null=False,
                                 blank=False,
                                 related_name="org_type")
    rel_type = models.ForeignKey('company.CompanyRelTypes',
                                 null=False,
                                 blank=False)
    status = models.ForeignKey('company.CompanyStatus',
                               null=False,
                               blank=False)
    date_add = models.DateTimeField(auto_now_add=True)
    date_update = models.DateTimeField(auto_now=True)

    class Meta:
        db_table = 'dummy_companies'
        verbose_name_plural = 'Тестирование / Компании'

    def __unicode__(self):
        return u'[%s] %s' % (self.id, self.name)
Ejemplo n.º 6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('display_name', models.CharField(blank=True, max_length=100, null=True)),
                ('slug', models.SlugField(blank=True, default='')),
                ('city', models.CharField(max_length=100)),
                ('country', django_countries.fields.CountryField(default='', max_length=2)),
                ('Description', froala_editor.fields.FroalaField()),
                ('hiring_agency', models.BooleanField(default=False)),
                ('eeo_text', models.TextField(blank=True, null=True)),
                ('since', models.IntegerField(choices=[(1800, 1800), (1801, 1801), (1802, 1802), (1803, 1803), (1804, 1804), (1805, 1805), (1806, 1806), (1807, 1807), (1808, 1808), (1809, 1809), (1810, 1810), (1811, 1811), (1812, 1812), (1813, 1813), (1814, 1814), (1815, 1815), (1816, 1816), (1817, 1817), (1818, 1818), (1819, 1819), (1820, 1820), (1821, 1821), (1822, 1822), (1823, 1823), (1824, 1824), (1825, 1825), (1826, 1826), (1827, 1827), (1828, 1828), (1829, 1829), (1830, 1830), (1831, 1831), (1832, 1832), (1833, 1833), (1834, 1834), (1835, 1835), (1836, 1836), (1837, 1837), (1838, 1838), (1839, 1839), (1840, 1840), (1841, 1841), (1842, 1842), (1843, 1843), (1844, 1844), (1845, 1845), (1846, 1846), (1847, 1847), (1848, 1848), (1849, 1849), (1850, 1850), (1851, 1851), (1852, 1852), (1853, 1853), (1854, 1854), (1855, 1855), (1856, 1856), (1857, 1857), (1858, 1858), (1859, 1859), (1860, 1860), (1861, 1861), (1862, 1862), (1863, 1863), (1864, 1864), (1865, 1865), (1866, 1866), (1867, 1867), (1868, 1868), (1869, 1869), (1870, 1870), (1871, 1871), (1872, 1872), (1873, 1873), (1874, 1874), (1875, 1875), (1876, 1876), (1877, 1877), (1878, 1878), (1879, 1879), (1880, 1880), (1881, 1881), (1882, 1882), (1883, 1883), (1884, 1884), (1885, 1885), (1886, 1886), (1887, 1887), (1888, 1888), (1889, 1889), (1890, 1890), (1891, 1891), (1892, 1892), (1893, 1893), (1894, 1894), (1895, 1895), (1896, 1896), (1897, 1897), (1898, 1898), (1899, 1899), (1900, 1900), (1901, 1901), (1902, 1902), (1903, 1903), (1904, 1904), (1905, 1905), (1906, 1906), (1907, 1907), (1908, 1908), (1909, 1909), (1910, 1910), (1911, 1911), (1912, 1912), (1913, 1913), (1914, 1914), (1915, 1915), (1916, 1916), (1917, 1917), (1918, 1918), (1919, 1919), (1920, 1920), (1921, 1921), (1922, 1922), (1923, 1923), (1924, 1924), (1925, 1925), (1926, 1926), (1927, 1927), (1928, 1928), (1929, 1929), (1930, 1930), (1931, 1931), (1932, 1932), (1933, 1933), (1934, 1934), (1935, 1935), (1936, 1936), (1937, 1937), (1938, 1938), (1939, 1939), (1940, 1940), (1941, 1941), (1942, 1942), (1943, 1943), (1944, 1944), (1945, 1945), (1946, 1946), (1947, 1947), (1948, 1948), (1949, 1949), (1950, 1950), (1951, 1951), (1952, 1952), (1953, 1953), (1954, 1954), (1955, 1955), (1956, 1956), (1957, 1957), (1958, 1958), (1959, 1959), (1960, 1960), (1961, 1961), (1962, 1962), (1963, 1963), (1964, 1964), (1965, 1965), (1966, 1966), (1967, 1967), (1968, 1968), (1969, 1969), (1970, 1970), (1971, 1971), (1972, 1972), (1973, 1973), (1974, 1974), (1975, 1975), (1976, 1976), (1977, 1977), (1978, 1978), (1979, 1979), (1980, 1980), (1981, 1981), (1982, 1982), (1983, 1983), (1984, 1984), (1985, 1985), (1986, 1986), (1987, 1987), (1988, 1988), (1989, 1989), (1990, 1990), (1991, 1991), (1992, 1992), (1993, 1993), (1994, 1994), (1995, 1995), (1996, 1996), (1997, 1997), (1998, 1998), (1999, 1999), (2000, 2000), (2001, 2001), (2002, 2002), (2003, 2003), (2004, 2004), (2005, 2005), (2006, 2006), (2007, 2007), (2008, 2008), (2009, 2009), (2010, 2010), (2011, 2011), (2012, 2012), (2013, 2013), (2014, 2014), (2015, 2015), (2016, 2016), (2017, 2017), (2018, 2018)], default=company.models.current_year)),
                ('contact_info', models.CharField(default='', max_length=100)),
                ('website', models.URLField(default='', max_length=100)),
                ('facebook', models.URLField(blank=True, max_length=100)),
                ('twitter', models.URLField(blank=True, max_length=100)),
                ('linkedin', models.URLField(blank=True, max_length=100)),
                ('logo', models.ImageField(blank=True, default=0, null=True, upload_to=app.validators.image_path)),
            ],
        ),
        migrations.CreateModel(
            name='Office',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('country', django_countries.fields.CountryField(default='', max_length=2)),
                ('city', models.CharField(max_length=100)),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.Company')),
            ],
        ),
    ]
Ejemplo n.º 7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Attachment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('file',
                 models.FileField(upload_to=company.models.company_file_path)),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date created')),
                ('updated_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='date updated')),
            ],
        ),
        migrations.CreateModel(
            name='Branch',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(choices=[
                     ('CO', 'Computer Engineering'),
                     ('ME', 'Mechanical Engineering'),
                     ('CE', 'Civil Engineering'),
                     ('EE', 'Electrical Engineering'),
                     ('CH', 'Chemical Engineering'),
                     ('EC', 'Electronics and Communication Engineering'),
                     ('PHY', 'Physics'), ('CHEM', 'Chemistry'),
                     ('MATH', 'Mathematics'), ('ALL', 'All Branches')
                 ],
                                  max_length=4)),
                ('degree',
                 models.CharField(choices=[('BTECH', 'BTech'),
                                           ('MTECH', 'MTech'), ('MSC', 'MSc')],
                                  default='BTECH',
                                  max_length=5)),
            ],
        ),
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
                ('slug', models.SlugField()),
                ('website',
                 models.URLField(blank=True, max_length=255, null=True)),
                ('about',
                 models.TextField(blank=True, max_length=5000, null=True)),
                ('perks',
                 models.TextField(blank=True, max_length=5000, null=True)),
                ('infra_req',
                 models.TextField(blank=True, max_length=5000, null=True)),
                ('other',
                 models.TextField(blank=True, max_length=5000, null=True)),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date created')),
                ('updated_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='date updated')),
            ],
        ),
        migrations.CreateModel(
            name='CRPDate',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('datatype',
                 models.CharField(choices=[('MON', 'Month'),
                                           ('WOM', 'Week of Month'),
                                           ('DAT', 'Date')],
                                  max_length=3)),
                ('month', models.IntegerField(blank=True, null=True)),
                ('date', models.DateField(blank=True, null=True)),
                ('week_number',
                 models.CharField(blank=True,
                                  choices=[('F', 'First'), ('S', 'Second'),
                                           ('T', 'Third'), ('L', 'Last')],
                                  max_length=1,
                                  null=True)),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date created')),
                ('updated_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='date updated')),
            ],
        ),
        migrations.CreateModel(
            name='Job',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('designation', models.CharField(max_length=255, unique=True)),
                ('description',
                 models.TextField(blank=True, max_length=5000, null=True)),
                ('requirements',
                 models.TextField(blank=True, max_length=5000, null=True)),
                ('eligibility_criteria',
                 models.TextField(blank=True, max_length=5000, null=True)),
                ('ctc',
                 models.DecimalField(blank=True,
                                     decimal_places=2,
                                     max_digits=4)),
                ('ctc_details',
                 models.TextField(blank=True, max_length=5000, null=True)),
                ('bond_details',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  unique=True)),
                ('number_of_selections',
                 models.IntegerField(blank=True, null=True)),
                ('other',
                 models.TextField(blank=True, max_length=5000, null=True)),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date created')),
                ('updated_at',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='date updated')),
            ],
        ),
        migrations.CreateModel(
            name='JobLocation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('location', models.CharField(max_length=255)),
                ('job',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='job_location',
                                   to='company.Job')),
            ],
        ),
        migrations.CreateModel(
            name='JobType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('job_domain',
                 models.CharField(choices=[('C', 'Core'), ('N', 'Non-Core')],
                                  max_length=1)),
                ('job_type', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='PlacementCategory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
                ('ctc_range', models.CharField(max_length=255, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='SelectionProcedure',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('procedure', models.CharField(max_length=255)),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='jobtype',
            unique_together=set([('job_domain', 'job_type')]),
        ),
        migrations.AddField(
            model_name='job',
            name='category',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='job',
                to='company.PlacementCategory'),
        ),
        migrations.AddField(
            model_name='job',
            name='company',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='job',
                to='company.Company'),
        ),
        migrations.AddField(
            model_name='job',
            name='eligible_branches',
            field=models.ManyToManyField(to='company.Branch'),
        ),
        migrations.AddField(
            model_name='job',
            name='job_type',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='job',
                to='company.JobType'),
        ),
        migrations.AddField(
            model_name='job',
            name='selection_procedure',
            field=models.ManyToManyField(to='company.SelectionProcedure'),
        ),
        migrations.AddField(
            model_name='crpdate',
            name='job',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='crpdate',
                to='company.Job'),
        ),
        migrations.AlterUniqueTogether(
            name='branch',
            unique_together=set([('name', 'degree')]),
        ),
        migrations.AddField(
            model_name='attachment',
            name='job',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='attachment',
                to='company.Job'),
        ),
        migrations.AlterUniqueTogether(
            name='joblocation',
            unique_together=set([('job', 'location')]),
        ),
    ]
Ejemplo n.º 8
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(help_text='Company name',
                                  max_length=100,
                                  unique=True)),
                ('description',
                 models.CharField(help_text='Description of the company',
                                  max_length=500)),
                ('website',
                 models.URLField(blank=True, help_text='Company website URL')),
                ('address',
                 models.CharField(blank=True,
                                  help_text='Company address',
                                  max_length=200)),
                ('phone',
                 models.CharField(blank=True,
                                  help_text='Contact phone number',
                                  max_length=50)),
                ('email',
                 models.EmailField(blank=True,
                                   help_text='Contact email address',
                                   max_length=254)),
                ('contact',
                 models.CharField(blank=True,
                                  help_text='Point of contact',
                                  max_length=100)),
                ('URL',
                 models.URLField(
                     blank=True,
                     help_text='Link to external company information')),
                ('image',
                 models.ImageField(
                     blank=True,
                     max_length=255,
                     null=True,
                     upload_to=company.models.rename_company_image)),
                ('notes', models.TextField(blank=True)),
                ('is_customer',
                 models.BooleanField(
                     default=False,
                     help_text='Do you sell items to this company?')),
                ('is_supplier',
                 models.BooleanField(
                     default=True,
                     help_text='Do you purchase items from this company?')),
            ],
        ),
        migrations.CreateModel(
            name='Contact',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('phone', models.CharField(blank=True, max_length=100)),
                ('email', models.EmailField(blank=True, max_length=254)),
                ('role', models.CharField(blank=True, max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='SupplierPart',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('SKU',
                 models.CharField(help_text='Supplier stock keeping unit',
                                  max_length=100)),
                ('manufacturer',
                 models.CharField(blank=True,
                                  help_text='Manufacturer',
                                  max_length=100)),
                ('MPN',
                 models.CharField(blank=True,
                                  help_text='Manufacturer part number',
                                  max_length=100)),
                ('URL',
                 models.URLField(
                     blank=True,
                     help_text='URL for external supplier part link')),
                ('description',
                 models.CharField(blank=True,
                                  help_text='Supplier part description',
                                  max_length=250)),
                ('note',
                 models.CharField(blank=True,
                                  help_text='Notes',
                                  max_length=100)),
                ('base_cost',
                 models.DecimalField(
                     decimal_places=3,
                     default=0,
                     help_text='Minimum charge (e.g. stocking fee)',
                     max_digits=10,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('packaging',
                 models.CharField(blank=True,
                                  help_text='Part packaging',
                                  max_length=50)),
                ('multiple',
                 models.PositiveIntegerField(
                     default=1,
                     help_text='Order multiple',
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('minimum',
                 models.PositiveIntegerField(
                     default=1,
                     help_text='Minimum order quantity (MOQ)',
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('lead_time', models.DurationField(blank=True, null=True)),
            ],
            options={
                'db_table': 'part_supplierpart',
            },
        ),
        migrations.CreateModel(
            name='SupplierPriceBreak',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity',
                 models.PositiveIntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(1)
                                 ])),
                ('cost',
                 models.DecimalField(
                     decimal_places=5,
                     max_digits=10,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('part',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='pricebreaks',
                                   to='company.SupplierPart')),
            ],
            options={
                'db_table': 'part_supplierpricebreak',
            },
        ),
    ]
Ejemplo n.º 9
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Send_Email',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('username',
                 models.CharField(blank=True, max_length=50, null=True)),
                ('email',
                 models.EmailField(blank=True, max_length=50, null=True)),
                ('content',
                 models.CharField(blank=True, max_length=350, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('verb', models.CharField(max_length=100)),
                ('description', models.TextField()),
                ('read', models.BooleanField(default=False)),
                ('post', models.IntegerField()),
                ('applicant', models.IntegerField()),
                ('receiver',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Match_Results',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('resume',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='resume')),
                ('app_email',
                 models.CharField(blank=True,
                                  max_length=50,
                                  verbose_name='email')),
                ('job_id',
                 models.IntegerField(blank=True,
                                     null=True,
                                     verbose_name='the job')),
                ('skills_rslt',
                 models.CharField(blank=True,
                                  max_length=1000,
                                  null=True,
                                  verbose_name='match result')),
                ('status',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='status')),
                ('content',
                 models.CharField(blank=True, max_length=300, null=True)),
                ('aplcnt',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='CreatePost',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('jobtitle', models.CharField(blank=True, max_length=50)),
                ('job_description', models.CharField(blank=True,
                                                     max_length=500)),
                ('joblocation', models.CharField(blank=True, max_length=50)),
                ('city', models.CharField(blank=True, max_length=50)),
                ('Area', models.CharField(blank=True, max_length=50)),
                ('careerlevel', models.CharField(blank=True, max_length=50)),
                ('year_of_experience',
                 models.CharField(blank=True, max_length=50)),
                ('salary_range1', models.CharField(blank=True, max_length=50)),
                ('salary_range2', models.CharField(blank=True, max_length=50)),
                ('num_vacancies', models.TextField(blank=True, max_length=50)),
                ('jobtype', models.CharField(blank=True, max_length=50)),
                ('image',
                 models.ImageField(blank=True,
                                   upload_to=company.models.upload_location)),
                ('skills', models.CharField(blank=True, max_length=500)),
                ('deadline', models.DateField(blank=True)),
                ('status', models.CharField(default='Publishing',
                                            max_length=10)),
                ('date_published',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date published')),
                ('date_updated',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='date updated')),
                ('slug', models.SlugField(blank=True)),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Ejemplo n.º 10
0
class Migration(migrations.Migration):

    dependencies = [
        ('company', '0005_merge_20170927_1238'),
    ]

    operations = [
        migrations.CreateModel(
            name='TblCoupons',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True,
                                          max_length=250,
                                          null=True)),
                ('coupon_id',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('display_name',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('discount',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('applicable_on',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('valid_for',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('valid_on_days',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('start_date',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('end_date',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('actual_price',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('offer_price',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('terms_conditions',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('special_offer_menus',
                 models.FileField(
                     blank=True,
                     null=True,
                     upload_to=company.models.get_special_offer_menu_path)),
                ('date_created', models.DateTimeField(blank=True, null=True)),
                ('date_updated', models.DateTimeField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='TblHappyHours',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True,
                                          max_length=250,
                                          null=True)),
                ('happy_hour_id',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('display_name',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('start_time',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('end_time',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('discount',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('applicable_on',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('valid_for',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('valid_on_days',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('terms_conditions',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('date_created', models.DateTimeField(blank=True, null=True)),
                ('date_updated', models.DateTimeField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='TblRepetetionDate',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('day', models.CharField(blank=True, max_length=250,
                                         null=True)),
                ('start_time',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('end_time',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('date_created', models.DateTimeField(blank=True, null=True)),
                ('date_updated', models.DateTimeField(blank=True, null=True)),
                ('happy_hour',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='company.TblHappyHours')),
            ],
        ),
        migrations.AlterField(
            model_name='tblvendor',
            name='cover_photo',
            field=models.FileField(
                blank=True,
                null=True,
                upload_to=company.models.get_vendor_image_path),
        ),
    ]
Ejemplo n.º 11
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('name', models.CharField(max_length=50, verbose_name='имя')),
                ('salary', models.FloatField(verbose_name='salary')),
                ('address',
                 models.CharField(blank=True,
                                  max_length=200,
                                  null=True,
                                  verbose_name='address')),
                ('phone',
                 models.CharField(max_length=100,
                                  unique=True,
                                  verbose_name='phone')),
                ('is_staff',
                 models.BooleanField(default=False, verbose_name='is staff')),
                ('is_superuser',
                 models.BooleanField(default=False,
                                     verbose_name='is superuser')),
                ('role',
                 models.CharField(choices=[('director', 'director'),
                                           ('manager', 'manager'),
                                           ('technologist', 'technologist'),
                                           ('accountant', 'accountant'),
                                           ('hr', 'hr')],
                                  max_length=30,
                                  null=True)),
            ],
            options={
                'verbose_name': 'employee',
                'verbose_name_plural': 'employees',
                'db_table': 'employee',
            },
            managers=[
                ('objects', company.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Budget',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('summ', models.FloatField(verbose_name='sum')),
            ],
            options={
                'verbose_name': 'budget',
                'verbose_name_plural': 'budget',
                'db_table': 'budget',
            },
        ),
        migrations.CreateModel(
            name='Credit',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('bank', models.CharField(max_length=50, verbose_name='bank')),
                ('date_of_issue', models.DateField()),
                ('fine', models.FloatField()),
                ('percent', models.FloatField()),
                ('sum', models.FloatField()),
                ('year', models.FloatField()),
                ('redeemed', models.FloatField()),
            ],
            options={
                'db_table': 'credit',
            },
        ),
        migrations.CreateModel(
            name='Ingredient',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity', models.FloatField(verbose_name='quantity')),
            ],
            options={
                'verbose_name': 'ingredient',
                'verbose_name_plural': 'ingredients',
                'db_table': 'ingredient',
            },
        ),
        migrations.CreateModel(
            name='Material',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50,
                                  unique=True,
                                  verbose_name='имя')),
                ('summ', models.FloatField(verbose_name='sum')),
                ('quantity', models.FloatField(verbose_name='quantity')),
            ],
            options={
                'verbose_name': 'material',
                'verbose_name_plural': 'materials',
                'db_table': 'material',
            },
        ),
        migrations.CreateModel(
            name='Payroll',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('year', models.IntegerField(verbose_name='year')),
                ('month', models.IntegerField(verbose_name='month')),
                ('date', models.DateField(verbose_name='date')),
                ('salary', models.FloatField(verbose_name='salary')),
                ('prize', models.FloatField(verbose_name='prize')),
                ('employee',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'payroll',
                'verbose_name_plural': 'payroll',
                'db_table': 'payroll',
            },
        ),
        migrations.CreateModel(
            name='Position',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='имя')),
            ],
            options={
                'verbose_name': 'position',
                'verbose_name_plural': 'positions',
                'db_table': 'position',
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50,
                                  unique=True,
                                  verbose_name='имя')),
                ('summ', models.FloatField(verbose_name='sum')),
                ('quantity', models.FloatField(verbose_name='quantity')),
            ],
            options={
                'verbose_name': 'product',
                'verbose_name_plural': 'products',
                'db_table': 'product',
            },
        ),
        migrations.CreateModel(
            name='Production',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity', models.FloatField(verbose_name='quantity')),
                ('time', models.DateTimeField(verbose_name='time')),
                ('employee',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
                ('product',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='company.Product')),
            ],
            options={
                'verbose_name': 'production',
                'verbose_name_plural': 'production',
                'db_table': 'production',
            },
        ),
        migrations.CreateModel(
            name='Purchase',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity', models.FloatField(verbose_name='quantity')),
                ('summ', models.FloatField(verbose_name='sum')),
                ('time', models.DateTimeField(verbose_name='time')),
                ('employee',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
                ('material',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='company.Material')),
            ],
            options={
                'verbose_name': 'purchase',
                'verbose_name_plural': 'purchases',
                'db_table': 'purchase',
            },
        ),
        migrations.CreateModel(
            name='Repayment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('payment_date', models.DateField(verbose_name='date')),
                ('sum_all', models.FloatField(blank=True, null=True)),
                ('payment_sum',
                 models.FloatField(blank=True, null=True, verbose_name='sum')),
                ('percents', models.FloatField(blank=True, null=True)),
                ('fine', models.FloatField(blank=True, null=True)),
                ('bank',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='repayments',
                                   to='company.Credit')),
            ],
            options={
                'db_table': 'repayment',
            },
        ),
        migrations.CreateModel(
            name='Sale',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('quantity', models.FloatField(verbose_name='quantity')),
                ('summ', models.FloatField(verbose_name='sum')),
                ('time', models.DateTimeField(verbose_name='time')),
                ('employee',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
                ('product',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='company.Product')),
            ],
            options={
                'verbose_name': 'sale',
                'verbose_name_plural': 'sale',
                'db_table': 'sale',
            },
        ),
        migrations.CreateModel(
            name='Unit',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=50,
                                  unique=True,
                                  verbose_name='имя')),
            ],
            options={
                'verbose_name': 'unit',
                'verbose_name_plural': 'units',
                'db_table': 'unit',
            },
        ),
        migrations.AddField(
            model_name='product',
            name='unit',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to='company.Unit',
                verbose_name='unit'),
        ),
        migrations.AddField(
            model_name='material',
            name='unit',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                to='company.Unit',
                verbose_name='unit'),
        ),
        migrations.AddField(
            model_name='ingredient',
            name='material',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='company.Material'),
        ),
        migrations.AddField(
            model_name='ingredient',
            name='product',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='company.Product'),
        ),
        migrations.AddField(
            model_name='employee',
            name='position',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to='company.Position'),
        ),
    ]
Ejemplo n.º 12
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('company_index',
                 models.IntegerField(db_column='company_index',
                                     default=12,
                                     verbose_name='单位编号')),
                ('company_name',
                 models.CharField(db_column='company_name',
                                  max_length=50,
                                  unique=True,
                                  verbose_name='单位名称')),
                ('company_address',
                 models.CharField(db_column='company_address',
                                  max_length=50,
                                  verbose_name='单位地址')),
            ],
            options={
                'verbose_name': '单位名称',
                'verbose_name_plural': '单位名称',
                'db_table': 'company',
                'ordering': ['company_index'],
            },
        ),
        migrations.CreateModel(
            name='Department',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('department_index',
                 models.IntegerField(db_column='department_index',
                                     default=12,
                                     verbose_name='部门编号')),
                ('department_name',
                 models.CharField(db_column='department_name',
                                  max_length=50,
                                  verbose_name='部门名称')),
                ('department_position',
                 models.CharField(db_column='department_position',
                                  max_length=50,
                                  verbose_name='部门位置')),
                ('belong_company',
                 models.ForeignKey(db_column='belong_company',
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='company.Company',
                                   verbose_name='单位名称')),
            ],
            options={
                'verbose_name': '部门名称',
                'verbose_name_plural': '部门名称',
                'db_table': 'department',
                'ordering': ['department_index'],
            },
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('employee_index',
                 models.CharField(db_column='employee_index',
                                  max_length=20,
                                  unique=True,
                                  verbose_name='员工编号')),
                ('employee_name',
                 models.CharField(db_column='employee_name',
                                  max_length=10,
                                  verbose_name='员工姓名')),
                ('employee_gender',
                 models.CharField(choices=[('M', '男'), ('F', '女'),
                                           ('U', '不详')],
                                  db_column='employee_gender',
                                  max_length=10,
                                  verbose_name='员工姓别')),
                ('employee_telephone',
                 models.CharField(db_column='employee_telephone',
                                  max_length=20,
                                  verbose_name='联系电话')),
                ('belong_department',
                 models.ForeignKey(blank=True,
                                   db_column='belong_department',
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='company.Company',
                                   verbose_name='所属部门')),
            ],
            options={
                'verbose_name': '员工信息',
                'verbose_name_plural': '员工信息',
                'db_table': 'employee',
                'ordering': ['employee_index'],
            },
        ),
        migrations.CreateModel(
            name='EmployeeDetail',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('employee_img',
                 models.ImageField(
                     blank=True,
                     db_column='employee_img',
                     null=True,
                     upload_to=company.models.user_directory_path,
                     verbose_name='头像')),
                ('employee_hire_date',
                 models.DateTimeField(auto_now_add=True,
                                      db_column='employee_hire_date',
                                      verbose_name='入职时间')),
                ('is_delete',
                 models.BooleanField(db_column='is_delete',
                                     default=False,
                                     verbose_name='是否离职')),
            ],
            options={
                'verbose_name': '员工详细信息',
                'verbose_name_plural': '员工详细信息',
                'db_table': 'employee_detail',
                'ordering': ['employee_index'],
            },
        ),
        migrations.CreateModel(
            name='LeadershipPosition',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('leadership_positon_name',
                 models.CharField(db_column='pro_title_name',
                                  max_length=50,
                                  verbose_name='领导职务')),
            ],
            options={
                'verbose_name': '领导职务',
                'verbose_name_plural': '领导职务',
                'db_table': 'leadershipposition',
            },
        ),
        migrations.CreateModel(
            name='Professional',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('professional_name',
                 models.CharField(db_column='pro_name',
                                  max_length=50,
                                  verbose_name='专业名称')),
            ],
            options={
                'verbose_name': '专业名称',
                'verbose_name_plural': '专业名称',
                'db_table': 'professional',
            },
        ),
        migrations.CreateModel(
            name='ProfessionalTitle',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('professional_title_name',
                 models.CharField(db_column='pro_title_name',
                                  max_length=50,
                                  verbose_name='专业职称')),
            ],
            options={
                'verbose_name': '专业职称',
                'verbose_name_plural': '专业职称',
                'db_table': 'professionaltitle',
            },
        ),
        migrations.AddField(
            model_name='employeedetail',
            name='belong_leadership_position',
            field=models.ForeignKey(
                blank=True,
                db_column='belong_leadership_position',
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='company.LeadershipPosition',
                verbose_name='领导职务'),
        ),
        migrations.AddField(
            model_name='employeedetail',
            name='belong_professional',
            field=models.OneToOneField(
                db_column='belong_professional',
                on_delete=django.db.models.deletion.CASCADE,
                to='company.Professional',
                verbose_name='专业名称'),
        ),
        migrations.AddField(
            model_name='employeedetail',
            name='belong_professional_title',
            field=models.OneToOneField(
                db_column='belong_professional_title',
                on_delete=django.db.models.deletion.CASCADE,
                to='company.ProfessionalTitle',
                verbose_name='专业职称'),
        ),
        migrations.AddField(
            model_name='employeedetail',
            name='employee_index',
            field=models.OneToOneField(
                db_column='employee_index',
                on_delete=django.db.models.deletion.CASCADE,
                to='company.Employee',
                verbose_name='员工编号'),
        ),
    ]
Ejemplo n.º 13
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='ChanPinXinXi',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('cpbh',
                 models.CharField(blank=True,
                                  editable=False,
                                  max_length=50,
                                  null=True,
                                  verbose_name='产品编号')),
                ('cpmc', models.CharField(max_length=50, verbose_name='产品名称')),
                ('cpdj', models.CharField(max_length=50, verbose_name='产品等级')),
                ('cd', models.CharField(max_length=50, verbose_name='产地')),
                ('jj',
                 models.DecimalField(decimal_places=2,
                                     default=0,
                                     max_digits=10,
                                     verbose_name='进价')),
                ('cj',
                 models.DecimalField(decimal_places=2,
                                     default=0,
                                     max_digits=10,
                                     verbose_name='出价')),
                ('bzw',
                 models.CharField(blank=True,
                                  max_length=5,
                                  null=True,
                                  verbose_name='包装物')),
            ],
            options={
                'verbose_name_plural': '产品信息',
                'verbose_name': '产品信息',
            },
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=10,
                                  unique=True,
                                  verbose_name='中文姓名')),
                ('lxdh', models.CharField(max_length=12, verbose_name='联系电话')),
            ],
            options={
                'verbose_name_plural': '员工账户',
                'verbose_name': '员工账户',
            },
        ),
        migrations.CreateModel(
            name='GuKeXinXi',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('gkbh',
                 models.CharField(max_length=20,
                                  unique=True,
                                  verbose_name='顾客编号')),
                ('gkmc',
                 models.CharField(max_length=20,
                                  unique=True,
                                  verbose_name='顾客名称')),
                ('gkzz', models.CharField(max_length=20, verbose_name='顾客住址')),
                ('lxdh', models.CharField(max_length=12, verbose_name='联系电话')),
            ],
            options={
                'verbose_name_plural': '顾客信息',
                'verbose_name': '顾客信息',
            },
        ),
        migrations.CreateModel(
            name='JiGou',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('jgbh',
                 models.CharField(editable=False,
                                  max_length=50,
                                  unique=True,
                                  verbose_name='机构编号')),
                ('jgmc',
                 models.CharField(editable=False,
                                  max_length=50,
                                  unique=True,
                                  verbose_name='机构名称')),
                ('jglb',
                 models.CharField(choices=[('GS', '公司'), ('JD', '生产基地'),
                                           ('PF', '批发中心'), ('DG', '代购点')],
                                  max_length=50,
                                  verbose_name='机构类别')),
                ('lxdh', models.CharField(max_length=12, verbose_name='联系电话')),
                ('level',
                 models.PositiveSmallIntegerField(blank=True,
                                                  null=True,
                                                  verbose_name='等级')),
                ('fzr',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=models.SET(
                                       company.models.get_sentinel_user),
                                   to='company.Employee',
                                   to_field='name',
                                   verbose_name='负责人')),
                ('ssjg',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='child_jg',
                     to='company.JiGou',
                     verbose_name='所属机构')),
            ],
            options={
                'verbose_name_plural': '公司机构',
                'verbose_name': '公司机构',
            },
        ),
        migrations.CreateModel(
            name='NongHuXinXi',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nhbh',
                 models.CharField(max_length=100,
                                  unique=True,
                                  verbose_name='农户编号')),
                ('nhmc',
                 models.CharField(max_length=100,
                                  unique=True,
                                  verbose_name='农户名称')),
                ('nhzz', models.CharField(max_length=100,
                                          verbose_name='农户住址')),
                ('lxdh', models.CharField(max_length=12, verbose_name='联系电话')),
                ('dgd',
                 models.ForeignKey(limit_choices_to={'jglb': 'DGD'},
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='company.JiGou',
                                   verbose_name='所属代购点')),
            ],
            options={
                'verbose_name_plural': '农户信息',
                'verbose_name': '农户信息',
            },
        ),
        migrations.CreateModel(
            name='PingZhongXinXi',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('pzbm',
                 models.CharField(max_length=20,
                                  unique=True,
                                  verbose_name='品种编码')),
                ('pzmc', models.CharField(max_length=20, verbose_name='品种名称')),
            ],
            options={
                'verbose_name_plural': '品种信息',
                'verbose_name': '品种信息',
            },
        ),
        migrations.CreateModel(
            name='WuZiXinXi',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('wzbh',
                 models.CharField(max_length=50,
                                  unique=True,
                                  verbose_name='物资编号')),
                ('wzmc',
                 models.CharField(max_length=50,
                                  unique=True,
                                  verbose_name='物资名称')),
                ('jldw', models.CharField(max_length=5, verbose_name='计量单位')),
                ('jj',
                 models.DecimalField(decimal_places=2,
                                     max_digits=10,
                                     verbose_name='进价')),
                ('cj',
                 models.DecimalField(decimal_places=2,
                                     max_digits=10,
                                     verbose_name='出价')),
            ],
            options={
                'verbose_name_plural': '物资信息',
                'verbose_name': '物资信息',
            },
        ),
        migrations.AddField(
            model_name='employee',
            name='ssjg',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='company.JiGou',
                verbose_name='所属机构'),
        ),
        migrations.AddField(
            model_name='employee',
            name='user',
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='employee',
                to=settings.AUTH_USER_MODEL,
                verbose_name='管理员账户'),
        ),
        migrations.AddField(
            model_name='chanpinxinxi',
            name='jgbh',
            field=models.ForeignKey(
                blank=True,
                limit_choices_to={'jglb': 'scjd'},
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='company.JiGou',
                verbose_name='基地编号'),
        ),
        migrations.AddField(
            model_name='chanpinxinxi',
            name='pzbm',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='company.PingZhongXinXi',
                verbose_name='品种编码'),
        ),
        migrations.AlterUniqueTogether(
            name='chanpinxinxi',
            unique_together={('cpmc', 'cd')},
        ),
    ]
Ejemplo n.º 14
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='TblVendor',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user', models.CharField(blank=True,
                                          max_length=250,
                                          null=True)),
                ('password',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('name', models.CharField(blank=True,
                                          max_length=250,
                                          null=True)),
                ('address',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('phone',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('email', models.CharField(max_length=250, unique=True)),
                ('web_url',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('latitude', models.FloatField(blank=True, null=True)),
                ('longitude', models.FloatField(blank=True, null=True)),
                ('description', models.TextField(blank=True, null=True)),
                ('cover_photo',
                 models.FileField(
                     blank=True,
                     null=True,
                     upload_to=company.models.get_vendor_image_path)),
                ('mon_op_timings',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('mon_close_timings',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('tues_op_timings',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('tues_close_timings',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('wed_op_timings',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('wed_close_timings',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('thurs_op_timings',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('thurs_close_timings',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('fri_op_timings',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('fri_close_timings',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('sat_op_timings',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('sat_close_timings',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('sun_op_timings',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('sun_close_timings',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('food_menu',
                 models.FileField(
                     blank=True,
                     null=True,
                     upload_to=company.models.get_food_menu_path)),
                ('drinks_menu',
                 models.FileField(
                     blank=True,
                     null=True,
                     upload_to=company.models.get_drinks_menu_path)),
                ('dessert_menu',
                 models.FileField(
                     blank=True,
                     null=True,
                     upload_to=company.models.get_dessert_menu_path)),
                ('cafe_menu',
                 models.FileField(
                     blank=True,
                     null=True,
                     upload_to=company.models.get_cafe_menu_path)),
                ('category',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('cuisines',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('ambience',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('special_offerings',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('ordering_options', models.IntegerField(blank=True,
                                                         null=True)),
                ('cost_for_two',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('payment_modes',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('facilities',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('contact_person',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('phone_contact_person',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('date_created', models.DateTimeField(blank=True, null=True)),
                ('date_updated', models.DateTimeField(blank=True, null=True)),
                ('is_anonymous', models.IntegerField(default=False)),
                ('is_active', models.IntegerField(default=1)),
                ('is_authenticated', models.IntegerField(default=False)),
                ('last_login', models.DateTimeField(default='1970-01-01')),
            ],
        ),
        migrations.CreateModel(
            name='TblData',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('cat_type',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('cat_name',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('display_name',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('image',
                 models.FileField(blank=True,
                                  null=True,
                                  upload_to=company.models.get_catagory_path)),
            ],
        ),
        migrations.CreateModel(
            name='TblVendorImages',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.FileField(
                     blank=True,
                     null=True,
                     upload_to=company.models.get_vendor_image_path)),
                ('vendor',
                 models.ForeignKey(blank=True,
                                   max_length=250,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]