This commit is contained in:
Maxchil 2020-06-12 16:54:09 +02:00
commit 10f5337a3f
16 changed files with 42 additions and 33 deletions

View File

@ -1,15 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.OpenApi.Models; using Microsoft.OpenApi.Models;
namespace Internship.Api namespace Internship.Api

View File

@ -1,6 +1,6 @@
namespace Internship.Core namespace Internship.Core
{ {
public struct Address public class Address
{ {
public string Street { get; set; } public string Street { get; set; }
public string Building { get; set; } public string Building { get; set; }

View File

@ -2,7 +2,9 @@
{ {
public class BranchOffice public class BranchOffice
{ {
public Company Company { get; set; } public int Id { get; set; }
public Address Address { get; set; } public Address Address { get; set; }
public Company Company { get; set; }
public int Provider { get; set; }
} }
} }

View File

@ -1,12 +1,15 @@
using System; using System;
using System.Collections.Generic;
namespace Internship.Core namespace Internship.Core
{ {
public class Company public class Company
{ {
public string Nip { get; set; }
public string Name { get; set; } public string Name { get; set; }
public RangeOfActivities Range { get; set; } public RangeOfActivities Range { get; set; }
public Uri SiteAddress { get; set; } public Uri SiteAddress { get; set; }
public string Nip { get; set; } public int Provider { get; set; }
public List<BranchOffice> Branches { get; set; }
} }
} }

View File

@ -2,5 +2,7 @@
{ {
public class Course public class Course
{ {
public int Id { get; set; }
public string Name { get; set; }
} }
} }

View File

@ -2,7 +2,7 @@
namespace Internship.Core namespace Internship.Core
{ {
public struct DeanAcceptance public class DeanAcceptance
{ {
public DateTime AcceptanceDate { get; set; } public DateTime AcceptanceDate { get; set; }
public bool IsDeansAcceptanceRequired { get; set; } public bool IsDeansAcceptanceRequired { get; set; }

View File

@ -1,12 +1,14 @@
using System; using System;
using System.Collections.Generic;
namespace Internship.Core namespace Internship.Core
{ {
public class Edition public class Edition
{ {
public int Id { get; set; }
public DateTime StartDate { get; set; } public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; } public DateTime EndDate { get; set; }
public DateTime IPPDeadlineDate { get; set; } public DateTime IPPDeadlineDate { get; set; }
public List<InternshipProgramSubject> Subjects { get; set;}
} }
} }

View File

@ -2,7 +2,7 @@
namespace Internship.Core namespace Internship.Core
{ {
public struct Insurance public class Insurance
{ {
public DateTime InsuranceDeliveryDate { get; set; } public DateTime InsuranceDeliveryDate { get; set; }
public bool IsInsuranceRequired { get; set; } public bool IsInsuranceRequired { get; set; }

View File

@ -1,21 +1,23 @@
using System; using System;
using System.Collections.Generic;
namespace Internship.Core namespace Internship.Core
{ {
public class Internship public class InternshipEntity
{ {
public int Id { get; set; }
public Intern Intern { get; set; } public Intern Intern { get; set; }
public Edition Edition { get; set; } public Edition Edition { get; set; }
public Report Report { get; set; } public Report Report { get; set; }
public BranchOffice BranchOffice { get; set; } public BranchOffice BranchOffice { get; set; }
public InternshipProgram Program { get; set; }
public InternshipType Type { get; set; } public InternshipType Type { get; set; }
public DateTime StartDate { get; set; } public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; } public DateTime EndDate { get; set; }
public bool IsAccepted { get; set; } public bool IsAccepted { get; set; }
public DeanAcceptance DeanAcceptance { get; set; } public DeanAcceptance DeanAcceptance { get; set; }
public Insurance Insurance { get; set; } public Insurance Insurance { get; set; }
public int InternshipLengthInWeeks { get; set; } public int InternshipLengthInWeeks { get; set; }
public float Grade { get; set; }
public List<InternshipProgramSubject> Program { get; set; }
} }
} }

View File

@ -1,6 +0,0 @@
namespace Internship.Core
{
public class InternshipProgram
{
}
}

View 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; }
}
}

View File

@ -2,7 +2,13 @@
{ {
public enum InternshipType public enum InternshipType
{ {
B2B, Other,
Free FreeInternship,
GraduateInternship,
FreeApprenticeship,
PaidApprenticeship,
EmploymentContract,
MandateContract,
ContractWork
} }
} }

View File

@ -2,5 +2,8 @@
{ {
public enum RangeOfActivities public enum RangeOfActivities
{ {
Other,
National,
International
} }
} }

View File

@ -2,5 +2,6 @@
{ {
public class Report public class Report
{ {
public int Id { get; set; }
} }
} }

View File

@ -1,8 +0,0 @@
using System;
namespace Internship.Repository
{
public class Class1
{
}
}

View File

@ -4,7 +4,7 @@ using Machine.Specifications;
namespace Internship.Core.Tests namespace Internship.Core.Tests
{ {
[Subject(typeof(Internship))] [Subject(typeof(InternshipEntity))]
class When_doing_something class When_doing_something
{ {
Establish context = () => { }; Establish context = () => { };