improve model based on IPP form and add ids to entities (#8)
Merge branch 'master' of http://git.kadet.net/system-praktyk/system-praktyk-api into feat/improve_model change model according to request, add Ids ide configuration changes, add postgre to compose Co-authored-by: Maxchil <m.w.bohdanowicz@gmail.com>
This commit is contained in:
parent
09f943e6c3
commit
d234246248
@ -1,15 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.HttpsPolicy;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.OpenApi.Models;
|
||||
|
||||
namespace Internship.Api
|
||||
|
@ -1,6 +1,6 @@
|
||||
namespace Internship.Core
|
||||
{
|
||||
public struct Address
|
||||
public class Address
|
||||
{
|
||||
public string Street { get; set; }
|
||||
public string Building { get; set; }
|
||||
|
@ -2,7 +2,9 @@
|
||||
{
|
||||
public class BranchOffice
|
||||
{
|
||||
public Company Company { get; set; }
|
||||
public int Id { get; set; }
|
||||
public Address Address { get; set; }
|
||||
public Company Company { get; set; }
|
||||
public int Provider { get; set; }
|
||||
}
|
||||
}
|
@ -1,12 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Internship.Core
|
||||
{
|
||||
public class Company
|
||||
{
|
||||
public string Nip { get; set; }
|
||||
public string Name { get; set; }
|
||||
public RangeOfActivities Range { get; set; }
|
||||
public Uri SiteAddress { get; set; }
|
||||
public string Nip { get; set; }
|
||||
public int Provider { get; set; }
|
||||
public List<BranchOffice> Branches { get; set; }
|
||||
}
|
||||
}
|
@ -2,5 +2,7 @@
|
||||
{
|
||||
public class Course
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Internship.Core
|
||||
{
|
||||
public struct DeanAcceptance
|
||||
public class DeanAcceptance
|
||||
{
|
||||
public DateTime AcceptanceDate { get; set; }
|
||||
public bool IsDeansAcceptanceRequired { get; set; }
|
||||
|
@ -1,12 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Internship.Core
|
||||
{
|
||||
public class Edition
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public DateTime StartDate { get; set; }
|
||||
public DateTime EndDate { get; set; }
|
||||
public DateTime IPPDeadlineDate { get; set; }
|
||||
|
||||
public List<InternshipProgramSubject> Subjects { get; set;}
|
||||
}
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Internship.Core
|
||||
{
|
||||
public struct Insurance
|
||||
public class Insurance
|
||||
{
|
||||
public DateTime InsuranceDeliveryDate { get; set; }
|
||||
public bool IsInsuranceRequired { get; set; }
|
||||
|
@ -1,21 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Internship.Core
|
||||
{
|
||||
public class Internship
|
||||
public class InternshipEntity
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Intern Intern { get; set; }
|
||||
public Edition Edition { get; set; }
|
||||
public Report Report { get; set; }
|
||||
public BranchOffice BranchOffice { get; set; }
|
||||
public InternshipProgram Program { get; set; }
|
||||
public InternshipType Type { get; set; }
|
||||
public DateTime StartDate { get; set; }
|
||||
public DateTime EndDate { get; set; }
|
||||
public bool IsAccepted { get; set; }
|
||||
public DeanAcceptance DeanAcceptance { get; set; }
|
||||
public Insurance Insurance { get; set; }
|
||||
|
||||
public int InternshipLengthInWeeks { get; set; }
|
||||
public float Grade { get; set; }
|
||||
public List<InternshipProgramSubject> Program { get; set; }
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
namespace Internship.Core
|
||||
{
|
||||
public class InternshipProgram
|
||||
{
|
||||
}
|
||||
}
|
9
src/Internship.Core/InternshipProgramSubject.cs
Normal file
9
src/Internship.Core/InternshipProgramSubject.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace Internship.Core
|
||||
{
|
||||
public class InternshipProgramSubject
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public Course Course { get; set; }
|
||||
public string Description { get; set; }
|
||||
}
|
||||
}
|
@ -2,7 +2,13 @@
|
||||
{
|
||||
public enum InternshipType
|
||||
{
|
||||
B2B,
|
||||
Free
|
||||
Other,
|
||||
FreeInternship,
|
||||
GraduateInternship,
|
||||
FreeApprenticeship,
|
||||
PaidApprenticeship,
|
||||
EmploymentContract,
|
||||
MandateContract,
|
||||
ContractWork
|
||||
}
|
||||
}
|
@ -2,5 +2,8 @@
|
||||
{
|
||||
public enum RangeOfActivities
|
||||
{
|
||||
Other,
|
||||
National,
|
||||
International
|
||||
}
|
||||
}
|
@ -2,5 +2,6 @@
|
||||
{
|
||||
public class Report
|
||||
{
|
||||
public int Id { get; set; }
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace Internship.Repository
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
}
|
||||
}
|
@ -4,7 +4,7 @@ using Machine.Specifications;
|
||||
|
||||
namespace Internship.Core.Tests
|
||||
{
|
||||
[Subject(typeof(Internship))]
|
||||
[Subject(typeof(InternshipEntity))]
|
||||
class When_doing_something
|
||||
{
|
||||
Establish context = () => { };
|
||||
|
Loading…
Reference in New Issue
Block a user