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'),
        ),
    ]
Esempio n. 2
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')),
            ],
        ),
    ]
Esempio n. 3
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',
            },
        ),
    ]
Esempio n. 4
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)),
            ],
        ),
    ]
Esempio n. 5
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'),
        ),
    ]
Esempio n. 6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Department',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dept_name', models.CharField(max_length=150, verbose_name='Department')),
                ('start_date', models.DateField(default=datetime.date.today, verbose_name='Start  Date')),
                ('end_date', models.DateField(blank=True, null=True, verbose_name='End Date')),
                ('creation_date', models.DateField(auto_now=True)),
                ('last_update_date', models.DateField(auto_now_add=True)),
                ('attribute1', models.CharField(max_length=255)),
                ('attribute2', models.CharField(max_length=255)),
                ('attribute3', models.CharField(max_length=255)),
                ('attribute4', models.CharField(max_length=255)),
                ('attribute5', models.CharField(max_length=255)),
                ('attribute6', models.CharField(max_length=255)),
                ('attribute7', models.CharField(max_length=255)),
                ('attribute8', models.CharField(max_length=255)),
                ('attribute9', models.CharField(max_length=255)),
                ('attribute10', models.CharField(max_length=255)),
                ('attribute11', models.CharField(max_length=255)),
                ('attribute12', models.CharField(max_length=255)),
                ('attribute13', models.CharField(max_length=255)),
                ('attribute14', models.CharField(max_length=255)),
                ('attribute15', models.CharField(max_length=255)),
                ('lft', models.PositiveIntegerField(editable=False)),
                ('rght', models.PositiveIntegerField(editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(editable=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Enterprise',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Company Name')),
                ('reg_tax_num', models.CharField(max_length=150, verbose_name='Reg Tax Num')),
                ('commercail_record', models.CharField(max_length=150, verbose_name='Commercial Record')),
                ('address1', models.CharField(blank=True, max_length=255, null=True, verbose_name='Address1')),
                ('phone', models.CharField(blank=True, max_length=255, null=True, verbose_name='Phone')),
                ('mobile', models.CharField(blank=True, max_length=255, null=True, verbose_name='Mobile')),
                ('fax', models.CharField(blank=True, max_length=255, null=True, verbose_name='Fax')),
                ('email', models.EmailField(blank=True, max_length=254, null=True, verbose_name='Email')),
                ('slug', models.SlugField(blank=True, null=True)),
                ('start_date', models.DateField(default=datetime.date.today, verbose_name='Start Date')),
                ('end_date', models.DateField(blank=True, null=True, verbose_name='End Date')),
                ('creation_date', models.DateField(auto_now=True)),
                ('last_update_date', models.DateField(auto_now_add=True)),
                ('attribute1', models.CharField(max_length=255)),
                ('attribute2', models.CharField(max_length=255)),
                ('attribute3', models.CharField(max_length=255)),
                ('attribute4', models.CharField(max_length=255)),
                ('attribute5', models.CharField(max_length=255)),
                ('attribute6', models.CharField(max_length=255)),
                ('attribute7', models.CharField(max_length=255)),
                ('attribute8', models.CharField(max_length=255)),
                ('attribute9', models.CharField(max_length=255)),
                ('attribute10', models.CharField(max_length=255)),
                ('attribute11', models.CharField(max_length=255)),
                ('attribute12', models.CharField(max_length=255)),
                ('attribute13', models.CharField(max_length=255)),
                ('attribute14', models.CharField(max_length=255)),
                ('attribute15', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Enterprise_Policies',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('policy_description', models.CharField(blank=True, max_length=255, null=True, verbose_name='Policy Description')),
                ('attachment', models.ImageField(blank=True, null=True, upload_to=company.models.path_and_rename, verbose_name='Attachment')),
                ('start_date', models.DateField(default=datetime.date.today, verbose_name='Start Date')),
                ('end_date', models.DateField(blank=True, null=True, verbose_name='End Date')),
                ('creation_date', models.DateField(auto_now=True)),
                ('last_update_date', models.DateField(auto_now_add=True)),
                ('attribute1', models.CharField(max_length=255)),
                ('attribute2', models.CharField(max_length=255)),
                ('attribute3', models.CharField(max_length=255)),
                ('attribute4', models.CharField(max_length=255)),
                ('attribute5', models.CharField(max_length=255)),
                ('attribute6', models.CharField(max_length=255)),
                ('attribute7', models.CharField(max_length=255)),
                ('attribute8', models.CharField(max_length=255)),
                ('attribute9', models.CharField(max_length=255)),
                ('attribute10', models.CharField(max_length=255)),
                ('attribute11', models.CharField(max_length=255)),
                ('attribute12', models.CharField(max_length=255)),
                ('attribute13', models.CharField(max_length=255)),
                ('attribute14', models.CharField(max_length=255)),
                ('attribute15', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Grade',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('grade_name', models.CharField(max_length=100, verbose_name='Grade Name')),
                ('grade_description', models.CharField(blank=True, max_length=255, null=True, verbose_name='Grade Description')),
                ('start_date', models.DateField(default=datetime.date.today, verbose_name='Start Date')),
                ('end_date', models.DateField(blank=True, null=True, verbose_name='End Date')),
                ('creation_date', models.DateField(auto_now=True)),
                ('last_update_date', models.DateField(auto_now_add=True)),
                ('attribute1', models.CharField(max_length=255)),
                ('attribute2', models.CharField(max_length=255)),
                ('attribute3', models.CharField(max_length=255)),
                ('attribute4', models.CharField(max_length=255)),
                ('attribute5', models.CharField(max_length=255)),
                ('attribute6', models.CharField(max_length=255)),
                ('attribute7', models.CharField(max_length=255)),
                ('attribute8', models.CharField(max_length=255)),
                ('attribute9', models.CharField(max_length=255)),
                ('attribute10', models.CharField(max_length=255)),
                ('attribute11', models.CharField(max_length=255)),
                ('attribute12', models.CharField(max_length=255)),
                ('attribute13', models.CharField(max_length=255)),
                ('attribute14', models.CharField(max_length=255)),
                ('attribute15', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Job',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('job_name', models.CharField(max_length=100, verbose_name='Job Name')),
                ('job_description', models.CharField(blank=True, max_length=255, null=True, verbose_name='Job Description')),
                ('start_date', models.DateField(default=datetime.date.today, verbose_name='Start Date')),
                ('end_date', models.DateField(blank=True, null=True, verbose_name='End Date')),
                ('creation_date', models.DateField(auto_now=True)),
                ('last_update_date', models.DateField(auto_now_add=True)),
                ('attribute1', models.CharField(max_length=255)),
                ('attribute2', models.CharField(max_length=255)),
                ('attribute3', models.CharField(max_length=255)),
                ('attribute4', models.CharField(max_length=255)),
                ('attribute5', models.CharField(max_length=255)),
                ('attribute6', models.CharField(max_length=255)),
                ('attribute7', models.CharField(max_length=255)),
                ('attribute8', models.CharField(max_length=255)),
                ('attribute9', models.CharField(max_length=255)),
                ('attribute10', models.CharField(max_length=255)),
                ('attribute11', models.CharField(max_length=255)),
                ('attribute12', models.CharField(max_length=255)),
                ('attribute13', models.CharField(max_length=255)),
                ('attribute14', models.CharField(max_length=255)),
                ('attribute15', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Position',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('position_name', models.CharField(max_length=100, verbose_name='Position Name')),
                ('position_description', models.CharField(blank=True, max_length=255, null=True, verbose_name='Position Description')),
                ('start_date', models.DateField(default=datetime.date.today, verbose_name='Start Date')),
                ('end_date', models.DateField(blank=True, null=True, verbose_name='End Date')),
                ('creation_date', models.DateField(auto_now=True)),
                ('last_update_date', models.DateField(auto_now_add=True)),
                ('attribute1', models.CharField(max_length=255)),
                ('attribute2', models.CharField(max_length=255)),
                ('attribute3', models.CharField(max_length=255)),
                ('attribute4', models.CharField(max_length=255)),
                ('attribute5', models.CharField(max_length=255)),
                ('attribute6', models.CharField(max_length=255)),
                ('attribute7', models.CharField(max_length=255)),
                ('attribute8', models.CharField(max_length=255)),
                ('attribute9', models.CharField(max_length=255)),
                ('attribute10', models.CharField(max_length=255)),
                ('attribute11', models.CharField(max_length=255)),
                ('attribute12', models.CharField(max_length=255)),
                ('attribute13', models.CharField(max_length=255)),
                ('attribute14', models.CharField(max_length=255)),
                ('attribute15', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Working_Days_Policy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number_of_daily_working_hrs', models.DecimalField(decimal_places=2, default=8, max_digits=3)),
                ('week_end_days', multiselectfield.db.fields.MultiSelectField(blank=True, choices=[(5, 'Saturday'), (6, 'Sunday'), (0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday')], max_length=100, null=True)),
                ('normal_over_time_hourly_rate', models.DecimalField(decimal_places=2, max_digits=3)),
                ('exceptional_over_time_hourly_rate', models.DecimalField(decimal_places=2, max_digits=3)),
                ('hrs_start_from', models.TimeField(blank=True, null=True, verbose_name='Working Hours From')),
                ('hrs_end_at', models.TimeField(blank=True, null=True, verbose_name='Working Hours To')),
                ('delay_allowed', models.TimeField(blank=True, null=True, verbose_name='Delay allowed')),
                ('delay_starts_from', models.TimeField(blank=True, null=True, verbose_name='Delay calculation starts from')),
                ('absence_starts_from', models.TimeField(blank=True, null=True, verbose_name='Absence calculation starts from')),
                ('start_date', models.DateField(default=datetime.date.today, verbose_name='Start Date')),
                ('end_date', models.DateField(blank=True, null=True, verbose_name='End Date')),
                ('creation_date', models.DateField(auto_now=True)),
                ('last_update_date', models.DateField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Working_Hours_Deductions_Policy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('day_number', models.IntegerField()),
                ('delay_rate', models.DecimalField(decimal_places=2, default=0.0, max_digits=3)),
                ('notify', models.BooleanField(default=False)),
                ('susbend', models.BooleanField(default=False)),
                ('start_date', models.DateField(default=datetime.date.today, verbose_name='Start Date')),
                ('end_date', models.DateField(blank=True, null=True, verbose_name='End Date')),
                ('creation_date', models.DateField(auto_now=True)),
                ('last_update_date', models.DateField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Year',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('year', models.IntegerField()),
                ('creation_date', models.DateField(auto_now_add=True)),
                ('last_update_date', models.DateField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='YearlyHoliday',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('start_date', models.DateField(verbose_name='Start Date')),
                ('end_date', models.DateField(verbose_name='End Date')),
                ('number_of_days_off', models.IntegerField(blank=True, null=True)),
                ('creation_date', models.DateField(auto_now=True)),
                ('last_update_date', models.DateField(auto_now_add=True)),
            ],
        ),
    ]
Esempio n. 7
0
class Migration(migrations.Migration):

    dependencies = [
        ('company', '0003_companyreview_highlight'),
    ]

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=15, verbose_name='Company Name')),
                ('tag',
                 models.CharField(max_length=255, verbose_name='Company Tag')),
                ('founded',
                 models.DateTimeField(verbose_name='Company Founded')),
                ('active',
                 models.BooleanField(default=True,
                                     verbose_name='Company State')),
                ('website',
                 models.URLField(max_length=50,
                                 verbose_name='Company Website')),
            ],
        ),
        migrations.CreateModel(
            name='CompanyTelephoneHelpline',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('helpline',
                 models.CharField(max_length=20,
                                  verbose_name='Helpline Type')),
                ('telephone',
                 models.CharField(max_length=15, verbose_name='Telephone')),
                ('company',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='company.company')),
            ],
        ),
        migrations.CreateModel(
            name='CompanyFounder',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='Name')),
                ('designation',
                 models.CharField(max_length=30, verbose_name='Designation')),
                ('profile_pic',
                 models.ImageField(
                     upload_to=company.models.profilepic_directory_path,
                     verbose_name='Profile Pic')),
                ('bio', models.TextField(verbose_name='About Founder')),
                ('company',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='company.company')),
            ],
        ),
        migrations.CreateModel(
            name='CompanyEmailHelpline',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('helpline',
                 models.CharField(max_length=20,
                                  verbose_name='Helpline Type')),
                ('email',
                 models.EmailField(max_length=254, verbose_name='Email')),
                ('company',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='company.company')),
            ],
        ),
        migrations.CreateModel(
            name='CompanyAddress',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('street', models.TextField(verbose_name='Street Address')),
                ('city', models.CharField(max_length=40, verbose_name='City')),
                ('pin', models.CharField(max_length=6, verbose_name='PIN')),
                ('district',
                 models.CharField(max_length=30, verbose_name='District')),
                ('state', models.CharField(max_length=30,
                                           verbose_name='State')),
                ('country',
                 models.CharField(max_length=30, verbose_name='Country')),
                ('company',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='company.company')),
            ],
        ),
    ]
Esempio 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')),
                ('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='员工编号'),
        ),
    ]