From ee4b70f32dca95aca6095248e20b748a0f22b004 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 27 Jul 2016 10:55:44 +0200 Subject: [PATCH] en supprimant Yavsc.Api --- Yavsc.Api/Model/Market/Service.cs | 26 ----- Yavsc.Api/project.json | 3 +- Yavsc.Api/project.lock.json | 24 +---- Yavsc/Helpers/SimpleJsonPostMethod.cs | 99 +++++++++++++++++++ Yavsc/Interfaces/IAccountBalance.cs | 9 ++ Yavsc/Interfaces/IApplicationUser.cs | 16 +++ Yavsc/Interfaces/IBlog.cs | 17 ++++ Yavsc/Interfaces/ICircle.cs | 13 +++ Yavsc/Interfaces/ICircleMember.cs | 9 ++ Yavsc/Interfaces/IContact.cs | 9 ++ .../IGoogleCloudMobileDeclaration.cs | 18 ++++ .../Interfaces/IIdentified.cs | 0 Yavsc/Interfaces/ILocation.cs | 8 ++ .../Interfaces/IPerformerSpecified.cs | 0 Yavsc/Interfaces/IPosition.cs | 8 ++ {Yavsc.Api => Yavsc}/Interfaces/IRating.cs | 0 {Yavsc.Api => Yavsc}/Interfaces/ITitle.cs | 0 .../Model/Access/Publishing.cs | 0 .../Model/Auth/ApplicationTypes.cs | 0 {Yavsc.Api => Yavsc}/Model/Auth/Client.cs | 0 .../Model/Auth/ExternalViewModel.cs | 0 .../Model/Auth/OAuth2Tokens.cs | 0 .../Model/Auth/RefreshToken.cs | 0 {Yavsc.Api => Yavsc}/Model/Auth/Scope.cs | 0 .../Model/Auth/UserCredentials.cs | 0 .../Model/Bank/AccountBalance.cs | 2 +- .../Model/Bank/BalanceImpact.cs | 0 {Yavsc.Api => Yavsc}/Model/Billing/Command.cs | 0 .../Model/Billing/CommandLine.cs | 0 Yavsc/Model/Billing/Contract.cs | 11 +++ .../Model/Billing/Estimate.cs | 2 +- .../Model/Billing/EstimateAgreement.cs | 4 +- .../Model/Billing/NominatvieCommande.cs | 0 .../Model/Billing/Service/ChatBilling.cs | 0 .../Model/Billing/histoestim.cs | 0 .../Model/Billing/satisfaction.cs | 0 .../Model/Billing/writtings.cs | 0 {Yavsc.Api => Yavsc}/Model/Billing/wrtags.cs | 0 {Yavsc.Api => Yavsc}/Model/Blog/Blog.cs | 14 ++- {Yavsc.Api => Yavsc}/Model/Blog/BlogAccess.cs | 0 .../Model/Blog/IBlogspotRepository.cs | 0 {Yavsc.Api => Yavsc}/Model/Blog/comment.cs | 0 .../Model/Booking/BookQuery.cs | 0 .../Model/Booking/RendezVous.cs | 0 .../Model/Calendar/ICalendarManager.cs | 0 .../Model/Calendar/IFreeDateSet.cs | 0 .../Model/Calendar/OpenDay.cs | 0 {Yavsc.Api => Yavsc}/Model/Calendar/Period.cs | 0 .../Model/Calendar/Periodicity.cs | 0 .../Model/Calendar/PositionAndKeyphrase.cs | 0 .../Model/Calendar/ProvidedEvent.cs | 0 .../Model/Calendar/Schedule.cs | 0 .../Model/Calendar/WeekDay.cs | 0 .../Model/Edition/IDocument.cs | 0 .../Model/Google/AuthToken.cs | 0 .../Google/Calendar/CalendarEventList.cs | 0 .../Model/Google/Calendar/CalendarList.cs | 0 .../Google/Calendar/CalendarListEntry.cs | 0 {Yavsc.Api => Yavsc}/Model/Google/GDate.cs | 0 .../Google/Messaging/GCMRegisterModel.cs | 0 .../Google/Messaging/MessageWithPayLoad.cs | 0 .../Messaging/MessageWithPayloadResponse.cs | 0 .../Model/Google/People/People.cs | 0 {Yavsc.Api => Yavsc}/Model/Google/Resource.cs | 0 .../Model/Google/Tracks/Entity.cs | 0 .../Model/Google/Tracks/EntityQuery.cs | 0 .../Model/Identity/ApplicationUser.cs | 14 +-- .../Model/Identity/MobileAppDeclaration.cs | 3 +- .../Model/Identity/passwrecovery.cs | 0 .../Model/Market/BaseProduct.cs | 0 {Yavsc.Api => Yavsc}/Model/Market/Catalog.cs | 0 {Yavsc.Api => Yavsc}/Model/Market/Product.cs | 0 Yavsc/Model/Market/Service.cs | 67 +++++++++++++ .../Model/Messaging/BaseEvent.cs | 0 .../Model/Messaging/BookQueryEvent.cs | 0 .../Model/Messaging/CircleEvent.cs | 0 .../Model/Messaging/Notification.cs | 0 .../Model/Messaging/YaEvent.cs | 0 .../Model/Relationship/Circle.cs | 6 +- .../Model/Relationship/CircleMember.cs | 0 .../Model/Relationship/Contact.cs | 4 +- .../Model/Relationship/Location.cs | 4 +- .../Model/Relationship/Tag.cs | 0 .../Model/Relationship/Tagged.cs | 0 .../Model/Workflow/Activity.cs | 2 - .../Model/Workflow/IRequisition.cs | 0 .../Model/Workflow/PerformerProfile.cs | 14 +-- .../Model/Workflow/Process/Action.cs | 0 .../Model/Workflow/Process/Conjonction.cs | 0 .../Model/Workflow/Process/Disjonction.cs | 0 .../Model/Workflow/Process/InputValue.cs | 0 .../Workflow/Process/NamedRequisition.cs | 0 .../Model/Workflow/Process/Negation.cs | 0 .../Model/Workflow/Process/Rule.cs | 0 {Yavsc.Api => Yavsc}/Model/Workflow/Projet.cs | 0 {Yavsc.Api => Yavsc}/Model/Workflow/Skill.cs | 0 .../Model/Workflow/UserSkills.cs | 0 {Yavsc.Api => Yavsc}/Model/Workflow/hr.cs | 0 .../Model/Workflow/taskdeps.cs | 0 {Yavsc.Api => Yavsc}/Model/Workflow/tasks.cs | 0 .../Model/Workflow/wrfiles.cs | 0 .../Model/societe.com/CompanyInfo.cs | 0 102 files changed, 326 insertions(+), 80 deletions(-) delete mode 100644 Yavsc.Api/Model/Market/Service.cs create mode 100644 Yavsc/Helpers/SimpleJsonPostMethod.cs create mode 100644 Yavsc/Interfaces/IAccountBalance.cs create mode 100644 Yavsc/Interfaces/IApplicationUser.cs create mode 100644 Yavsc/Interfaces/IBlog.cs create mode 100644 Yavsc/Interfaces/ICircle.cs create mode 100644 Yavsc/Interfaces/ICircleMember.cs create mode 100644 Yavsc/Interfaces/IContact.cs create mode 100644 Yavsc/Interfaces/IGoogleCloudMobileDeclaration.cs rename {Yavsc.Api => Yavsc}/Interfaces/IIdentified.cs (100%) create mode 100644 Yavsc/Interfaces/ILocation.cs rename {Yavsc.Api => Yavsc}/Interfaces/IPerformerSpecified.cs (100%) create mode 100644 Yavsc/Interfaces/IPosition.cs rename {Yavsc.Api => Yavsc}/Interfaces/IRating.cs (100%) rename {Yavsc.Api => Yavsc}/Interfaces/ITitle.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Access/Publishing.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Auth/ApplicationTypes.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Auth/Client.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Auth/ExternalViewModel.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Auth/OAuth2Tokens.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Auth/RefreshToken.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Auth/Scope.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Auth/UserCredentials.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Bank/AccountBalance.cs (87%) rename {Yavsc.Api => Yavsc}/Model/Bank/BalanceImpact.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Billing/Command.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Billing/CommandLine.cs (100%) create mode 100644 Yavsc/Model/Billing/Contract.cs rename {Yavsc.Api => Yavsc}/Model/Billing/Estimate.cs (98%) rename {Yavsc.Api => Yavsc}/Model/Billing/EstimateAgreement.cs (52%) rename {Yavsc.Api => Yavsc}/Model/Billing/NominatvieCommande.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Billing/Service/ChatBilling.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Billing/histoestim.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Billing/satisfaction.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Billing/writtings.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Billing/wrtags.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Blog/Blog.cs (66%) rename {Yavsc.Api => Yavsc}/Model/Blog/BlogAccess.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Blog/IBlogspotRepository.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Blog/comment.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Booking/BookQuery.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Booking/RendezVous.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Calendar/ICalendarManager.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Calendar/IFreeDateSet.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Calendar/OpenDay.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Calendar/Period.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Calendar/Periodicity.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Calendar/PositionAndKeyphrase.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Calendar/ProvidedEvent.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Calendar/Schedule.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Calendar/WeekDay.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Edition/IDocument.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Google/AuthToken.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Google/Calendar/CalendarEventList.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Google/Calendar/CalendarList.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Google/Calendar/CalendarListEntry.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Google/GDate.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Google/Messaging/GCMRegisterModel.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Google/Messaging/MessageWithPayLoad.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Google/Messaging/MessageWithPayloadResponse.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Google/People/People.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Google/Resource.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Google/Tracks/Entity.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Google/Tracks/EntityQuery.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Identity/ApplicationUser.cs (59%) rename {Yavsc.Api => Yavsc}/Model/Identity/MobileAppDeclaration.cs (90%) rename {Yavsc.Api => Yavsc}/Model/Identity/passwrecovery.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Market/BaseProduct.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Market/Catalog.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Market/Product.cs (100%) create mode 100644 Yavsc/Model/Market/Service.cs rename {Yavsc.Api => Yavsc}/Model/Messaging/BaseEvent.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Messaging/BookQueryEvent.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Messaging/CircleEvent.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Messaging/Notification.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Messaging/YaEvent.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Relationship/Circle.cs (71%) rename {Yavsc.Api => Yavsc}/Model/Relationship/CircleMember.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Relationship/Contact.cs (73%) rename {Yavsc.Api => Yavsc}/Model/Relationship/Location.cs (89%) rename {Yavsc.Api => Yavsc}/Model/Relationship/Tag.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Relationship/Tagged.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Workflow/Activity.cs (95%) rename {Yavsc.Api => Yavsc}/Model/Workflow/IRequisition.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Workflow/PerformerProfile.cs (77%) rename {Yavsc.Api => Yavsc}/Model/Workflow/Process/Action.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Workflow/Process/Conjonction.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Workflow/Process/Disjonction.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Workflow/Process/InputValue.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Workflow/Process/NamedRequisition.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Workflow/Process/Negation.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Workflow/Process/Rule.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Workflow/Projet.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Workflow/Skill.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Workflow/UserSkills.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Workflow/hr.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Workflow/taskdeps.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Workflow/tasks.cs (100%) rename {Yavsc.Api => Yavsc}/Model/Workflow/wrfiles.cs (100%) rename {Yavsc.Api => Yavsc}/Model/societe.com/CompanyInfo.cs (100%) diff --git a/Yavsc.Api/Model/Market/Service.cs b/Yavsc.Api/Model/Market/Service.cs deleted file mode 100644 index ba5a09aa..00000000 --- a/Yavsc.Api/Model/Market/Service.cs +++ /dev/null @@ -1,26 +0,0 @@ - -namespace Yavsc.Models.Market { - using System.ComponentModel.DataAnnotations.Schema; - - public enum BillingMode {  - Unitary, - SetPrice, - ByExecutionTime - } -public partial class Service : BaseProduct - { - public string ContextId { get; set; } - [ForeignKey("ContextId")] - public virtual Activity Context { get; set; } - - public BillingMode? Billing { get; set; } - // TODO public ServiceSpecification Specification { get; set; } - /// - /// In euro, either by hour or by release - /// - /// - public decimal? Pricing { get; set; } - - } - -} \ No newline at end of file diff --git a/Yavsc.Api/project.json b/Yavsc.Api/project.json index a67e5131..8af86670 100644 --- a/Yavsc.Api/project.json +++ b/Yavsc.Api/project.json @@ -24,8 +24,7 @@ "frameworks": { "net451": { "dependencies": { - "Yavsc.Client": "1.0.0-*" } } } -} \ No newline at end of file +} diff --git a/Yavsc.Api/project.lock.json b/Yavsc.Api/project.lock.json index a111b505..b20e6f25 100644 --- a/Yavsc.Api/project.lock.json +++ b/Yavsc.Api/project.lock.json @@ -751,13 +751,9 @@ "runtime": { "lib/net45/_._": {} } - }, - "Yavsc.Client/1.0.0": { - "type": "project", - "framework": ".NETPortable,Version=v4.5,Profile=Profile111" } }, - ".NETFramework,Version=v4.5.1/win7-x86": { + ".NETFramework,Version=v4.5.1/debian.8-x86": { "EntityFramework.Commands/7.0.0-rc1-final": { "type": "package", "dependencies": { @@ -1506,13 +1502,9 @@ "runtime": { "lib/net45/_._": {} } - }, - "Yavsc.Client/1.0.0": { - "type": "project", - "framework": ".NETPortable,Version=v4.5,Profile=Profile111" } }, - ".NETFramework,Version=v4.5.1/win7-x64": { + ".NETFramework,Version=v4.5.1/debian.8-x64": { "EntityFramework.Commands/7.0.0-rc1-final": { "type": "package", "dependencies": { @@ -2261,18 +2253,10 @@ "runtime": { "lib/net45/_._": {} } - }, - "Yavsc.Client/1.0.0": { - "type": "project", - "framework": ".NETPortable,Version=v4.5,Profile=Profile111" } } }, "libraries": { - "Yavsc.Client/1.0.0": { - "type": "project", - "path": "../wrap/Yavsc.Client/project.json" - }, "EntityFramework.Commands/7.0.0-rc1-final": { "type": "package", "serviceable": true, @@ -3057,8 +3041,6 @@ "Newtonsoft.Json >= 9.0.1", "System.Json >= 4.0.20126.16343" ], - ".NETFramework,Version=v4.5.1": [ - "Yavsc.Client >= 1.0.0-*" - ] + ".NETFramework,Version=v4.5.1": [] } } \ No newline at end of file diff --git a/Yavsc/Helpers/SimpleJsonPostMethod.cs b/Yavsc/Helpers/SimpleJsonPostMethod.cs new file mode 100644 index 00000000..5e9ceacc --- /dev/null +++ b/Yavsc/Helpers/SimpleJsonPostMethod.cs @@ -0,0 +1,99 @@ +// +// PostJson.cs +// +// Author: +// Paul Schneider +// +// Copyright (c) 2015 Paul Schneider +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Lesser General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public License +// along with this program. If not, see . +using System.Net; +using System.IO; +using System.Threading.Tasks; +using Newtonsoft.Json; +using System; +using System.Json; + +namespace Yavsc.Helpers +{ + /// + /// Simple json post method. + /// + public class SimpleJsonPostMethod : IDisposable + { + private HttpWebRequest request=null; + + /// + /// Initializes a new instance of the Yavsc.Helpers.SimpleJsonPostMethod class. + /// + /// Path to method. + public SimpleJsonPostMethod (string pathToMethod, string authorizationHeader = null) + { + request = (HttpWebRequest) WebRequest.Create (pathToMethod); + request.Method = "POST"; + request.Accept = "application/json"; + request.ContentType = "application/json"; + request.SendChunked = true; + request.TransferEncoding = "UTF-8"; + if (authorizationHeader!=null) + request.Headers["Authorization"]=authorizationHeader; + } + + public void Dispose() + { + request.Abort(); + } + + /// + /// Invoke the specified query. + /// + /// Query. + public TAnswer Invoke(object query) + { + + using (Stream streamQuery = request.GetRequestStream()) { + using (StreamWriter writer = new StreamWriter(streamQuery)) { + writer.Write (JsonConvert.SerializeObject(query)); + }} + TAnswer ans = default (TAnswer); + using (WebResponse response = request.GetResponse ()) { + using (Stream responseStream = response.GetResponseStream ()) { + using (StreamReader rdr = new StreamReader (responseStream)) { + ans = (TAnswer) JsonConvert.DeserializeObject (rdr.ReadToEnd ()); + } + } + response.Close(); + } + return ans; + } + + public async Task InvokeJson(object query) + { + JsonValue jsonDoc=null; + using (Stream streamQuery = request.GetRequestStream()) { + using (StreamWriter writer = new StreamWriter(streamQuery)) { + writer.Write (JsonConvert.SerializeObject(query)); + }} + using (WebResponse response = request.GetResponse ()) { + using (Stream stream = response.GetResponseStream ()) { + if (stream.Length>0) + jsonDoc = await Task.Run (() => JsonObject.Load (stream)); + } + response.Close(); + } + return jsonDoc; + } + } +} + diff --git a/Yavsc/Interfaces/IAccountBalance.cs b/Yavsc/Interfaces/IAccountBalance.cs new file mode 100644 index 00000000..437e6020 --- /dev/null +++ b/Yavsc/Interfaces/IAccountBalance.cs @@ -0,0 +1,9 @@ +namespace Yavsc.Models +{ + public interface IAccountBalance + { + long ContactCredits { get; set; } + decimal Credits { get; set; } + string UserId { get; set; } + } +} \ No newline at end of file diff --git a/Yavsc/Interfaces/IApplicationUser.cs b/Yavsc/Interfaces/IApplicationUser.cs new file mode 100644 index 00000000..9539fd40 --- /dev/null +++ b/Yavsc/Interfaces/IApplicationUser.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; +using Yavsc.Models.Identity; + +namespace Yavsc.Models +{ + public interface IApplicationUser + { + IAccountBalance AccountBalance { get; set; } + IList Book { get; set; } + IList Circles { get; set; } + string DedicatedGoogleCalendar { get; set; } + IList Devices { get; set; } + ILocation PostalAddress { get; set; } + IList Posts { get; set; } + } +} diff --git a/Yavsc/Interfaces/IBlog.cs b/Yavsc/Interfaces/IBlog.cs new file mode 100644 index 00000000..6e05bf37 --- /dev/null +++ b/Yavsc/Interfaces/IBlog.cs @@ -0,0 +1,17 @@ +using System; + +namespace Yavsc.Models +{ + public interface IBlog + { + string AuthorId { get; set; } + string bcontent { get; set; } + long Id { get; set; } + DateTime modified { get; set; } + string photo { get; set; } + DateTime posted { get; set; } + int rate { get; set; } + string title { get; set; } + bool visible { get; set; } + } +} \ No newline at end of file diff --git a/Yavsc/Interfaces/ICircle.cs b/Yavsc/Interfaces/ICircle.cs new file mode 100644 index 00000000..f0240ab0 --- /dev/null +++ b/Yavsc/Interfaces/ICircle.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; + +namespace Yavsc.Models +{ + public interface ICircle + { + long Id { get; set; } + IList Members { get; set; } + string Name { get; set; } + IApplicationUser Owner { get; set; } + string OwnerId { get; set; } + } +} \ No newline at end of file diff --git a/Yavsc/Interfaces/ICircleMember.cs b/Yavsc/Interfaces/ICircleMember.cs new file mode 100644 index 00000000..1bf99206 --- /dev/null +++ b/Yavsc/Interfaces/ICircleMember.cs @@ -0,0 +1,9 @@ +namespace Yavsc.Models +{ + public interface ICircleMember + { + ICircle Circle { get; set; } + long Id { get; set; } + IApplicationUser Member { get; set; } + } +} \ No newline at end of file diff --git a/Yavsc/Interfaces/IContact.cs b/Yavsc/Interfaces/IContact.cs new file mode 100644 index 00000000..8c6fb536 --- /dev/null +++ b/Yavsc/Interfaces/IContact.cs @@ -0,0 +1,9 @@ +namespace Yavsc.Models +{ + public interface IContact + { + IApplicationUser Owner { get; set; } + string OwnerId { get; set; } + string UserId { get; set; } + } +} \ No newline at end of file diff --git a/Yavsc/Interfaces/IGoogleCloudMobileDeclaration.cs b/Yavsc/Interfaces/IGoogleCloudMobileDeclaration.cs new file mode 100644 index 00000000..9ea3033c --- /dev/null +++ b/Yavsc/Interfaces/IGoogleCloudMobileDeclaration.cs @@ -0,0 +1,18 @@ +namespace Yavsc.Models.Identity +{ + public interface IGCMDeclaration + { + string DeviceId { get; set; } + string GCMRegistrationId { get; set; } + string Model { get; set; } + string Platform { get; set; } + string Version { get; set; } + + } + + public interface IGoogleCloudMobileDeclaration: IGCMDeclaration + { + IApplicationUser DeviceOwner { get; set; } + string DeviceOwnerId { get; set; } + } +} \ No newline at end of file diff --git a/Yavsc.Api/Interfaces/IIdentified.cs b/Yavsc/Interfaces/IIdentified.cs similarity index 100% rename from Yavsc.Api/Interfaces/IIdentified.cs rename to Yavsc/Interfaces/IIdentified.cs diff --git a/Yavsc/Interfaces/ILocation.cs b/Yavsc/Interfaces/ILocation.cs new file mode 100644 index 00000000..e3cc65e3 --- /dev/null +++ b/Yavsc/Interfaces/ILocation.cs @@ -0,0 +1,8 @@ +namespace Yavsc +{ + public interface ILocation + { + string Address { get; set; } + long Id { get; set; } + } +} \ No newline at end of file diff --git a/Yavsc.Api/Interfaces/IPerformerSpecified.cs b/Yavsc/Interfaces/IPerformerSpecified.cs similarity index 100% rename from Yavsc.Api/Interfaces/IPerformerSpecified.cs rename to Yavsc/Interfaces/IPerformerSpecified.cs diff --git a/Yavsc/Interfaces/IPosition.cs b/Yavsc/Interfaces/IPosition.cs new file mode 100644 index 00000000..99b97bc7 --- /dev/null +++ b/Yavsc/Interfaces/IPosition.cs @@ -0,0 +1,8 @@ +namespace Yavsc +{ + public interface IPosition + { + double Latitude { get; set; } + double Longitude { get; set; } + } +} \ No newline at end of file diff --git a/Yavsc.Api/Interfaces/IRating.cs b/Yavsc/Interfaces/IRating.cs similarity index 100% rename from Yavsc.Api/Interfaces/IRating.cs rename to Yavsc/Interfaces/IRating.cs diff --git a/Yavsc.Api/Interfaces/ITitle.cs b/Yavsc/Interfaces/ITitle.cs similarity index 100% rename from Yavsc.Api/Interfaces/ITitle.cs rename to Yavsc/Interfaces/ITitle.cs diff --git a/Yavsc.Api/Model/Access/Publishing.cs b/Yavsc/Model/Access/Publishing.cs similarity index 100% rename from Yavsc.Api/Model/Access/Publishing.cs rename to Yavsc/Model/Access/Publishing.cs diff --git a/Yavsc.Api/Model/Auth/ApplicationTypes.cs b/Yavsc/Model/Auth/ApplicationTypes.cs similarity index 100% rename from Yavsc.Api/Model/Auth/ApplicationTypes.cs rename to Yavsc/Model/Auth/ApplicationTypes.cs diff --git a/Yavsc.Api/Model/Auth/Client.cs b/Yavsc/Model/Auth/Client.cs similarity index 100% rename from Yavsc.Api/Model/Auth/Client.cs rename to Yavsc/Model/Auth/Client.cs diff --git a/Yavsc.Api/Model/Auth/ExternalViewModel.cs b/Yavsc/Model/Auth/ExternalViewModel.cs similarity index 100% rename from Yavsc.Api/Model/Auth/ExternalViewModel.cs rename to Yavsc/Model/Auth/ExternalViewModel.cs diff --git a/Yavsc.Api/Model/Auth/OAuth2Tokens.cs b/Yavsc/Model/Auth/OAuth2Tokens.cs similarity index 100% rename from Yavsc.Api/Model/Auth/OAuth2Tokens.cs rename to Yavsc/Model/Auth/OAuth2Tokens.cs diff --git a/Yavsc.Api/Model/Auth/RefreshToken.cs b/Yavsc/Model/Auth/RefreshToken.cs similarity index 100% rename from Yavsc.Api/Model/Auth/RefreshToken.cs rename to Yavsc/Model/Auth/RefreshToken.cs diff --git a/Yavsc.Api/Model/Auth/Scope.cs b/Yavsc/Model/Auth/Scope.cs similarity index 100% rename from Yavsc.Api/Model/Auth/Scope.cs rename to Yavsc/Model/Auth/Scope.cs diff --git a/Yavsc.Api/Model/Auth/UserCredentials.cs b/Yavsc/Model/Auth/UserCredentials.cs similarity index 100% rename from Yavsc.Api/Model/Auth/UserCredentials.cs rename to Yavsc/Model/Auth/UserCredentials.cs diff --git a/Yavsc.Api/Model/Bank/AccountBalance.cs b/Yavsc/Model/Bank/AccountBalance.cs similarity index 87% rename from Yavsc.Api/Model/Bank/AccountBalance.cs rename to Yavsc/Model/Bank/AccountBalance.cs index 56ae4479..5fff2c53 100644 --- a/Yavsc.Api/Model/Bank/AccountBalance.cs +++ b/Yavsc/Model/Bank/AccountBalance.cs @@ -10,7 +10,7 @@ namespace Yavsc.Models public string UserId { get; set; } [ForeignKey("UserId")] - public virtual IApplicationUser Owner { get; set; } + public virtual ApplicationUser Owner { get; set; } [Required,Display(Name="Credits in €")] public decimal Credits { get; set; } diff --git a/Yavsc.Api/Model/Bank/BalanceImpact.cs b/Yavsc/Model/Bank/BalanceImpact.cs similarity index 100% rename from Yavsc.Api/Model/Bank/BalanceImpact.cs rename to Yavsc/Model/Bank/BalanceImpact.cs diff --git a/Yavsc.Api/Model/Billing/Command.cs b/Yavsc/Model/Billing/Command.cs similarity index 100% rename from Yavsc.Api/Model/Billing/Command.cs rename to Yavsc/Model/Billing/Command.cs diff --git a/Yavsc.Api/Model/Billing/CommandLine.cs b/Yavsc/Model/Billing/CommandLine.cs similarity index 100% rename from Yavsc.Api/Model/Billing/CommandLine.cs rename to Yavsc/Model/Billing/CommandLine.cs diff --git a/Yavsc/Model/Billing/Contract.cs b/Yavsc/Model/Billing/Contract.cs new file mode 100644 index 00000000..896293db --- /dev/null +++ b/Yavsc/Model/Billing/Contract.cs @@ -0,0 +1,11 @@ +using Yavsc.Models.Market; + +namespace Yavsc.Models.Billing +{ + + public class ServiceContract

where P : Service + { + + } + +} \ No newline at end of file diff --git a/Yavsc.Api/Model/Billing/Estimate.cs b/Yavsc/Model/Billing/Estimate.cs similarity index 98% rename from Yavsc.Api/Model/Billing/Estimate.cs rename to Yavsc/Model/Billing/Estimate.cs index c4036975..f33192c0 100644 --- a/Yavsc.Api/Model/Billing/Estimate.cs +++ b/Yavsc/Model/Billing/Estimate.cs @@ -7,7 +7,7 @@ using Yavsc.Models.Booking; namespace Yavsc.Models.Billing { - public partial class RDVEstimate + public partial class Estimate { [Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long Id { get; set; } diff --git a/Yavsc.Api/Model/Billing/EstimateAgreement.cs b/Yavsc/Model/Billing/EstimateAgreement.cs similarity index 52% rename from Yavsc.Api/Model/Billing/EstimateAgreement.cs rename to Yavsc/Model/Billing/EstimateAgreement.cs index e9d8573a..a290f900 100644 --- a/Yavsc.Api/Model/Billing/EstimateAgreement.cs +++ b/Yavsc/Model/Billing/EstimateAgreement.cs @@ -1,10 +1,12 @@ using System; +using System.ComponentModel.DataAnnotations; namespace Yavsc.Models.Billing { - public partial class EstimateAgreement : RDVEstimate + public partial class Contract : Estimate { + [Required] public DateTime ClientValidationDate { get; set; } } } \ No newline at end of file diff --git a/Yavsc.Api/Model/Billing/NominatvieCommande.cs b/Yavsc/Model/Billing/NominatvieCommande.cs similarity index 100% rename from Yavsc.Api/Model/Billing/NominatvieCommande.cs rename to Yavsc/Model/Billing/NominatvieCommande.cs diff --git a/Yavsc.Api/Model/Billing/Service/ChatBilling.cs b/Yavsc/Model/Billing/Service/ChatBilling.cs similarity index 100% rename from Yavsc.Api/Model/Billing/Service/ChatBilling.cs rename to Yavsc/Model/Billing/Service/ChatBilling.cs diff --git a/Yavsc.Api/Model/Billing/histoestim.cs b/Yavsc/Model/Billing/histoestim.cs similarity index 100% rename from Yavsc.Api/Model/Billing/histoestim.cs rename to Yavsc/Model/Billing/histoestim.cs diff --git a/Yavsc.Api/Model/Billing/satisfaction.cs b/Yavsc/Model/Billing/satisfaction.cs similarity index 100% rename from Yavsc.Api/Model/Billing/satisfaction.cs rename to Yavsc/Model/Billing/satisfaction.cs diff --git a/Yavsc.Api/Model/Billing/writtings.cs b/Yavsc/Model/Billing/writtings.cs similarity index 100% rename from Yavsc.Api/Model/Billing/writtings.cs rename to Yavsc/Model/Billing/writtings.cs diff --git a/Yavsc.Api/Model/Billing/wrtags.cs b/Yavsc/Model/Billing/wrtags.cs similarity index 100% rename from Yavsc.Api/Model/Billing/wrtags.cs rename to Yavsc/Model/Billing/wrtags.cs diff --git a/Yavsc.Api/Model/Blog/Blog.cs b/Yavsc/Model/Blog/Blog.cs similarity index 66% rename from Yavsc.Api/Model/Blog/Blog.cs rename to Yavsc/Model/Blog/Blog.cs index 8f362f54..bdce0645 100644 --- a/Yavsc.Api/Model/Blog/Blog.cs +++ b/Yavsc/Model/Blog/Blog.cs @@ -4,22 +4,28 @@ using System.ComponentModel.DataAnnotations.Schema; namespace Yavsc.Models { - public partial class Blog: IBlog + public partial class Blog { [Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long Id { get; set; } + + [Display(Name="Content")] public string bcontent { get; set; } - [DisplayAttribute(Name="Modified")] + [Display(Name="Modified")] public DateTime modified { get; set; } + [Display(Name="Photo")] public string photo { get; set; } + [Display(Name="Posted")] public DateTime posted { get; set; } + [Display(Name="Rate")] public int rate { get; set; } + [Display(Name="Title")] public string title { get; set; } - [Required] public string AuthorId { get; set; } [ForeignKey("AuthorId")] - public IApplicationUser Author { set; get; } + public ApplicationUser Author { set; get; } + [Display(Name="Visible")] public bool visible { get; set; } } } diff --git a/Yavsc.Api/Model/Blog/BlogAccess.cs b/Yavsc/Model/Blog/BlogAccess.cs similarity index 100% rename from Yavsc.Api/Model/Blog/BlogAccess.cs rename to Yavsc/Model/Blog/BlogAccess.cs diff --git a/Yavsc.Api/Model/Blog/IBlogspotRepository.cs b/Yavsc/Model/Blog/IBlogspotRepository.cs similarity index 100% rename from Yavsc.Api/Model/Blog/IBlogspotRepository.cs rename to Yavsc/Model/Blog/IBlogspotRepository.cs diff --git a/Yavsc.Api/Model/Blog/comment.cs b/Yavsc/Model/Blog/comment.cs similarity index 100% rename from Yavsc.Api/Model/Blog/comment.cs rename to Yavsc/Model/Blog/comment.cs diff --git a/Yavsc.Api/Model/Booking/BookQuery.cs b/Yavsc/Model/Booking/BookQuery.cs similarity index 100% rename from Yavsc.Api/Model/Booking/BookQuery.cs rename to Yavsc/Model/Booking/BookQuery.cs diff --git a/Yavsc.Api/Model/Booking/RendezVous.cs b/Yavsc/Model/Booking/RendezVous.cs similarity index 100% rename from Yavsc.Api/Model/Booking/RendezVous.cs rename to Yavsc/Model/Booking/RendezVous.cs diff --git a/Yavsc.Api/Model/Calendar/ICalendarManager.cs b/Yavsc/Model/Calendar/ICalendarManager.cs similarity index 100% rename from Yavsc.Api/Model/Calendar/ICalendarManager.cs rename to Yavsc/Model/Calendar/ICalendarManager.cs diff --git a/Yavsc.Api/Model/Calendar/IFreeDateSet.cs b/Yavsc/Model/Calendar/IFreeDateSet.cs similarity index 100% rename from Yavsc.Api/Model/Calendar/IFreeDateSet.cs rename to Yavsc/Model/Calendar/IFreeDateSet.cs diff --git a/Yavsc.Api/Model/Calendar/OpenDay.cs b/Yavsc/Model/Calendar/OpenDay.cs similarity index 100% rename from Yavsc.Api/Model/Calendar/OpenDay.cs rename to Yavsc/Model/Calendar/OpenDay.cs diff --git a/Yavsc.Api/Model/Calendar/Period.cs b/Yavsc/Model/Calendar/Period.cs similarity index 100% rename from Yavsc.Api/Model/Calendar/Period.cs rename to Yavsc/Model/Calendar/Period.cs diff --git a/Yavsc.Api/Model/Calendar/Periodicity.cs b/Yavsc/Model/Calendar/Periodicity.cs similarity index 100% rename from Yavsc.Api/Model/Calendar/Periodicity.cs rename to Yavsc/Model/Calendar/Periodicity.cs diff --git a/Yavsc.Api/Model/Calendar/PositionAndKeyphrase.cs b/Yavsc/Model/Calendar/PositionAndKeyphrase.cs similarity index 100% rename from Yavsc.Api/Model/Calendar/PositionAndKeyphrase.cs rename to Yavsc/Model/Calendar/PositionAndKeyphrase.cs diff --git a/Yavsc.Api/Model/Calendar/ProvidedEvent.cs b/Yavsc/Model/Calendar/ProvidedEvent.cs similarity index 100% rename from Yavsc.Api/Model/Calendar/ProvidedEvent.cs rename to Yavsc/Model/Calendar/ProvidedEvent.cs diff --git a/Yavsc.Api/Model/Calendar/Schedule.cs b/Yavsc/Model/Calendar/Schedule.cs similarity index 100% rename from Yavsc.Api/Model/Calendar/Schedule.cs rename to Yavsc/Model/Calendar/Schedule.cs diff --git a/Yavsc.Api/Model/Calendar/WeekDay.cs b/Yavsc/Model/Calendar/WeekDay.cs similarity index 100% rename from Yavsc.Api/Model/Calendar/WeekDay.cs rename to Yavsc/Model/Calendar/WeekDay.cs diff --git a/Yavsc.Api/Model/Edition/IDocument.cs b/Yavsc/Model/Edition/IDocument.cs similarity index 100% rename from Yavsc.Api/Model/Edition/IDocument.cs rename to Yavsc/Model/Edition/IDocument.cs diff --git a/Yavsc.Api/Model/Google/AuthToken.cs b/Yavsc/Model/Google/AuthToken.cs similarity index 100% rename from Yavsc.Api/Model/Google/AuthToken.cs rename to Yavsc/Model/Google/AuthToken.cs diff --git a/Yavsc.Api/Model/Google/Calendar/CalendarEventList.cs b/Yavsc/Model/Google/Calendar/CalendarEventList.cs similarity index 100% rename from Yavsc.Api/Model/Google/Calendar/CalendarEventList.cs rename to Yavsc/Model/Google/Calendar/CalendarEventList.cs diff --git a/Yavsc.Api/Model/Google/Calendar/CalendarList.cs b/Yavsc/Model/Google/Calendar/CalendarList.cs similarity index 100% rename from Yavsc.Api/Model/Google/Calendar/CalendarList.cs rename to Yavsc/Model/Google/Calendar/CalendarList.cs diff --git a/Yavsc.Api/Model/Google/Calendar/CalendarListEntry.cs b/Yavsc/Model/Google/Calendar/CalendarListEntry.cs similarity index 100% rename from Yavsc.Api/Model/Google/Calendar/CalendarListEntry.cs rename to Yavsc/Model/Google/Calendar/CalendarListEntry.cs diff --git a/Yavsc.Api/Model/Google/GDate.cs b/Yavsc/Model/Google/GDate.cs similarity index 100% rename from Yavsc.Api/Model/Google/GDate.cs rename to Yavsc/Model/Google/GDate.cs diff --git a/Yavsc.Api/Model/Google/Messaging/GCMRegisterModel.cs b/Yavsc/Model/Google/Messaging/GCMRegisterModel.cs similarity index 100% rename from Yavsc.Api/Model/Google/Messaging/GCMRegisterModel.cs rename to Yavsc/Model/Google/Messaging/GCMRegisterModel.cs diff --git a/Yavsc.Api/Model/Google/Messaging/MessageWithPayLoad.cs b/Yavsc/Model/Google/Messaging/MessageWithPayLoad.cs similarity index 100% rename from Yavsc.Api/Model/Google/Messaging/MessageWithPayLoad.cs rename to Yavsc/Model/Google/Messaging/MessageWithPayLoad.cs diff --git a/Yavsc.Api/Model/Google/Messaging/MessageWithPayloadResponse.cs b/Yavsc/Model/Google/Messaging/MessageWithPayloadResponse.cs similarity index 100% rename from Yavsc.Api/Model/Google/Messaging/MessageWithPayloadResponse.cs rename to Yavsc/Model/Google/Messaging/MessageWithPayloadResponse.cs diff --git a/Yavsc.Api/Model/Google/People/People.cs b/Yavsc/Model/Google/People/People.cs similarity index 100% rename from Yavsc.Api/Model/Google/People/People.cs rename to Yavsc/Model/Google/People/People.cs diff --git a/Yavsc.Api/Model/Google/Resource.cs b/Yavsc/Model/Google/Resource.cs similarity index 100% rename from Yavsc.Api/Model/Google/Resource.cs rename to Yavsc/Model/Google/Resource.cs diff --git a/Yavsc.Api/Model/Google/Tracks/Entity.cs b/Yavsc/Model/Google/Tracks/Entity.cs similarity index 100% rename from Yavsc.Api/Model/Google/Tracks/Entity.cs rename to Yavsc/Model/Google/Tracks/Entity.cs diff --git a/Yavsc.Api/Model/Google/Tracks/EntityQuery.cs b/Yavsc/Model/Google/Tracks/EntityQuery.cs similarity index 100% rename from Yavsc.Api/Model/Google/Tracks/EntityQuery.cs rename to Yavsc/Model/Google/Tracks/EntityQuery.cs diff --git a/Yavsc.Api/Model/Identity/ApplicationUser.cs b/Yavsc/Model/Identity/ApplicationUser.cs similarity index 59% rename from Yavsc.Api/Model/Identity/ApplicationUser.cs rename to Yavsc/Model/Identity/ApplicationUser.cs index 6fa71131..24a285a8 100644 --- a/Yavsc.Api/Model/Identity/ApplicationUser.cs +++ b/Yavsc/Model/Identity/ApplicationUser.cs @@ -8,25 +8,25 @@ using Yavsc.Models.Identity; namespace Yavsc.Models { - public class ApplicationUser : IdentityUser, IApplicationUser + public class ApplicationUser : IdentityUser { [Display(Name="AccountBalance")] - public virtual IAccountBalance AccountBalance { get; set; } + public virtual AccountBalance AccountBalance { get; set; } [InverseProperty("Author")] - public virtual IList Posts { get; set; } + public virtual List Posts { get; set; } [InverseProperty("Owner")] - public virtual IList Book { get; set; } + public virtual List Book { get; set; } [InverseProperty("DeviceOwner")] - public virtual IList Devices { get; set; } + public virtual List Devices { get; set; } [InverseProperty("Owner")] - public virtual IList Circles { get; set; } - public virtual ILocation PostalAddress { get; set; } + public virtual List Circles { get; set; } + public virtual Location PostalAddress { get; set; } public string DedicatedGoogleCalendar { get; set; } diff --git a/Yavsc.Api/Model/Identity/MobileAppDeclaration.cs b/Yavsc/Model/Identity/MobileAppDeclaration.cs similarity index 90% rename from Yavsc.Api/Model/Identity/MobileAppDeclaration.cs rename to Yavsc/Model/Identity/MobileAppDeclaration.cs index 516fd951..bedd6b92 100644 --- a/Yavsc.Api/Model/Identity/MobileAppDeclaration.cs +++ b/Yavsc/Model/Identity/MobileAppDeclaration.cs @@ -1,3 +1,4 @@ +using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Newtonsoft.Json; @@ -18,7 +19,7 @@ namespace Yavsc.Models.Identity public string Platform { get; set; } public string Version { get; set; } public string DeviceOwnerId { get; set; } - + public DateTime DeclarationDate { get; set; } [JsonIgnore,ForeignKey("DeviceOwnerId")] public virtual ApplicationUser DeviceOwner { get; set; } } diff --git a/Yavsc.Api/Model/Identity/passwrecovery.cs b/Yavsc/Model/Identity/passwrecovery.cs similarity index 100% rename from Yavsc.Api/Model/Identity/passwrecovery.cs rename to Yavsc/Model/Identity/passwrecovery.cs diff --git a/Yavsc.Api/Model/Market/BaseProduct.cs b/Yavsc/Model/Market/BaseProduct.cs similarity index 100% rename from Yavsc.Api/Model/Market/BaseProduct.cs rename to Yavsc/Model/Market/BaseProduct.cs diff --git a/Yavsc.Api/Model/Market/Catalog.cs b/Yavsc/Model/Market/Catalog.cs similarity index 100% rename from Yavsc.Api/Model/Market/Catalog.cs rename to Yavsc/Model/Market/Catalog.cs diff --git a/Yavsc.Api/Model/Market/Product.cs b/Yavsc/Model/Market/Product.cs similarity index 100% rename from Yavsc.Api/Model/Market/Product.cs rename to Yavsc/Model/Market/Product.cs diff --git a/Yavsc/Model/Market/Service.cs b/Yavsc/Model/Market/Service.cs new file mode 100644 index 00000000..b0f2fdd7 --- /dev/null +++ b/Yavsc/Model/Market/Service.cs @@ -0,0 +1,67 @@ + +namespace Yavsc.Models.Market { + using System; + using System.ComponentModel.DataAnnotations.Schema; + + public enum BillingMode {  + Unitary, + SetPrice, + ByExecutionTime + } + + public interface IUnit { + string Name { get; } + bool CanConvertFrom(IUnit other); + VType ConvertFrom (IUnit other, VType orgValue) ; + } + public class Money : IUnit + { + public Money(string name, decimal euroExchangeRate) + { + Name = name; + EuroExchangeRate = euroExchangeRate; + } + + public string Name + { + get; private set ; + } + + public decimal EuroExchangeRate + { + get; private set ; + } + public bool CanConvertFrom(IUnit other) + { + if (other is Money) + return true; + return false; + } + + public decimal ConvertFrom(IUnit other, decimal orgValue) + { + if (other is Money) { + var om = other as Money; + return orgValue * om.EuroExchangeRate / EuroExchangeRate; + } + throw new NotImplementedException(); + } + } + + public partial class Service : BaseProduct + { + public string ContextId { get; set; } + [ForeignKey("ContextId")] + public virtual Activity Context { get; set; } + + public BillingMode? Billing { get; set; } + // TODO public ServiceSpecification Specification { get; set; } + ///

+ /// In euro + /// + /// + public decimal? Pricing { get; set; } + + } + +} \ No newline at end of file diff --git a/Yavsc.Api/Model/Messaging/BaseEvent.cs b/Yavsc/Model/Messaging/BaseEvent.cs similarity index 100% rename from Yavsc.Api/Model/Messaging/BaseEvent.cs rename to Yavsc/Model/Messaging/BaseEvent.cs diff --git a/Yavsc.Api/Model/Messaging/BookQueryEvent.cs b/Yavsc/Model/Messaging/BookQueryEvent.cs similarity index 100% rename from Yavsc.Api/Model/Messaging/BookQueryEvent.cs rename to Yavsc/Model/Messaging/BookQueryEvent.cs diff --git a/Yavsc.Api/Model/Messaging/CircleEvent.cs b/Yavsc/Model/Messaging/CircleEvent.cs similarity index 100% rename from Yavsc.Api/Model/Messaging/CircleEvent.cs rename to Yavsc/Model/Messaging/CircleEvent.cs diff --git a/Yavsc.Api/Model/Messaging/Notification.cs b/Yavsc/Model/Messaging/Notification.cs similarity index 100% rename from Yavsc.Api/Model/Messaging/Notification.cs rename to Yavsc/Model/Messaging/Notification.cs diff --git a/Yavsc.Api/Model/Messaging/YaEvent.cs b/Yavsc/Model/Messaging/YaEvent.cs similarity index 100% rename from Yavsc.Api/Model/Messaging/YaEvent.cs rename to Yavsc/Model/Messaging/YaEvent.cs diff --git a/Yavsc.Api/Model/Relationship/Circle.cs b/Yavsc/Model/Relationship/Circle.cs similarity index 71% rename from Yavsc.Api/Model/Relationship/Circle.cs rename to Yavsc/Model/Relationship/Circle.cs index 6afc1813..3ff655b2 100644 --- a/Yavsc.Api/Model/Relationship/Circle.cs +++ b/Yavsc/Model/Relationship/Circle.cs @@ -5,7 +5,7 @@ using System.ComponentModel.DataAnnotations.Schema; namespace Yavsc.Models { - public partial class Circle: ICircle { + public partial class Circle { [Key, DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)] public long Id { get; set; } @@ -13,9 +13,9 @@ namespace Yavsc.Models public string OwnerId { get; set; } [ForeignKey("OwnerId")] - public virtual IApplicationUser Owner { get; set; } + public virtual ApplicationUser Owner { get; set; } [InverseProperty("Circle")] - public virtual IList Members { get; set; } + public virtual List Members { get; set; } } } diff --git a/Yavsc.Api/Model/Relationship/CircleMember.cs b/Yavsc/Model/Relationship/CircleMember.cs similarity index 100% rename from Yavsc.Api/Model/Relationship/CircleMember.cs rename to Yavsc/Model/Relationship/CircleMember.cs diff --git a/Yavsc.Api/Model/Relationship/Contact.cs b/Yavsc/Model/Relationship/Contact.cs similarity index 73% rename from Yavsc.Api/Model/Relationship/Contact.cs rename to Yavsc/Model/Relationship/Contact.cs index 5ba7ecf3..781eb7e2 100644 --- a/Yavsc.Api/Model/Relationship/Contact.cs +++ b/Yavsc/Model/Relationship/Contact.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations.Schema; namespace Yavsc.Models { - public class Contact: IContact + public class Contact { [Required()] public string UserId { get; set; } @@ -13,6 +13,6 @@ namespace Yavsc.Models public string OwnerId { get; set; } [ForeignKeyAttribute("OwnerId")] - public virtual IApplicationUser Owner { get; set; } + public virtual ApplicationUser Owner { get; set; } } } diff --git a/Yavsc.Api/Model/Relationship/Location.cs b/Yavsc/Model/Relationship/Location.cs similarity index 89% rename from Yavsc.Api/Model/Relationship/Location.cs rename to Yavsc/Model/Relationship/Location.cs index 8a38be33..27066ac7 100644 --- a/Yavsc.Api/Model/Relationship/Location.cs +++ b/Yavsc/Model/Relationship/Location.cs @@ -7,7 +7,7 @@ namespace Yavsc /// /// Position. /// - public class Position: IPosition + public class Position { /// /// The longitude. @@ -27,7 +27,7 @@ namespace Yavsc } - public class Location : Position, ILocation { + public class Location : Position { [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long Id { get; set; } [Required(), diff --git a/Yavsc.Api/Model/Relationship/Tag.cs b/Yavsc/Model/Relationship/Tag.cs similarity index 100% rename from Yavsc.Api/Model/Relationship/Tag.cs rename to Yavsc/Model/Relationship/Tag.cs diff --git a/Yavsc.Api/Model/Relationship/Tagged.cs b/Yavsc/Model/Relationship/Tagged.cs similarity index 100% rename from Yavsc.Api/Model/Relationship/Tagged.cs rename to Yavsc/Model/Relationship/Tagged.cs diff --git a/Yavsc.Api/Model/Workflow/Activity.cs b/Yavsc/Model/Workflow/Activity.cs similarity index 95% rename from Yavsc.Api/Model/Workflow/Activity.cs rename to Yavsc/Model/Workflow/Activity.cs index dd474fbb..b7282505 100644 --- a/Yavsc.Api/Model/Workflow/Activity.cs +++ b/Yavsc/Model/Workflow/Activity.cs @@ -36,7 +36,5 @@ namespace Yavsc.Models /// string ModeratorGroupName { get; set; } - - } } diff --git a/Yavsc.Api/Model/Workflow/IRequisition.cs b/Yavsc/Model/Workflow/IRequisition.cs similarity index 100% rename from Yavsc.Api/Model/Workflow/IRequisition.cs rename to Yavsc/Model/Workflow/IRequisition.cs diff --git a/Yavsc.Api/Model/Workflow/PerformerProfile.cs b/Yavsc/Model/Workflow/PerformerProfile.cs similarity index 77% rename from Yavsc.Api/Model/Workflow/PerformerProfile.cs rename to Yavsc/Model/Workflow/PerformerProfile.cs index 2941b0f1..95f5ee18 100644 --- a/Yavsc.Api/Model/Workflow/PerformerProfile.cs +++ b/Yavsc/Model/Workflow/PerformerProfile.cs @@ -8,8 +8,8 @@ namespace Yavsc.Models.Workflow public class PerformerProfile { [Key] - public string PerfomerId { get; set; } - [ForeignKey("PerfomerId"),Display(Name="Performer")] + public string PerformerId { get; set; } + [ForeignKey("PerformerId"),Display(Name="Performer")] public virtual ApplicationUser Performer { get; set; } [Display(Name="Activity"),Required] @@ -21,10 +21,10 @@ namespace Yavsc.Models.Workflow RegularExpression(@"^[0-9]{9,14}$", ErrorMessage = "Only numbers are allowed here")] public string SIREN { get; set; } - public long OrganisationAddressId { get; set; } + public long OrganizationAddressId { get; set; } - [Required,Display(Name="Organisation address"),ForeignKey("OrganisationAddressId")] - public virtual Location OrganisationAddress { get; set; } + [Required,Display(Name="Organization address"),ForeignKey("OrganizationAddressId")] + public virtual Location OrganizationAddress { get; set; } [ForeignKey("ActivityCode"),Display(Name="Activity")] public virtual Activity Activity { get; set; } @@ -35,8 +35,8 @@ namespace Yavsc.Models.Workflow [Display(Name="Accept notifications from non-VIP users")] public bool AcceptPublicContact { get; set; } - [Display(Name="Allow my geolocatisation, nearby my clients")] - public bool AcceptGeoLocalisation { get; set; } + [Display(Name="Allow my geo-localization, nearby my clients")] + public bool AcceptGeoLocalization { get; set; } [Display(Name="Web site")] public string WebSite { get; set; } diff --git a/Yavsc.Api/Model/Workflow/Process/Action.cs b/Yavsc/Model/Workflow/Process/Action.cs similarity index 100% rename from Yavsc.Api/Model/Workflow/Process/Action.cs rename to Yavsc/Model/Workflow/Process/Action.cs diff --git a/Yavsc.Api/Model/Workflow/Process/Conjonction.cs b/Yavsc/Model/Workflow/Process/Conjonction.cs similarity index 100% rename from Yavsc.Api/Model/Workflow/Process/Conjonction.cs rename to Yavsc/Model/Workflow/Process/Conjonction.cs diff --git a/Yavsc.Api/Model/Workflow/Process/Disjonction.cs b/Yavsc/Model/Workflow/Process/Disjonction.cs similarity index 100% rename from Yavsc.Api/Model/Workflow/Process/Disjonction.cs rename to Yavsc/Model/Workflow/Process/Disjonction.cs diff --git a/Yavsc.Api/Model/Workflow/Process/InputValue.cs b/Yavsc/Model/Workflow/Process/InputValue.cs similarity index 100% rename from Yavsc.Api/Model/Workflow/Process/InputValue.cs rename to Yavsc/Model/Workflow/Process/InputValue.cs diff --git a/Yavsc.Api/Model/Workflow/Process/NamedRequisition.cs b/Yavsc/Model/Workflow/Process/NamedRequisition.cs similarity index 100% rename from Yavsc.Api/Model/Workflow/Process/NamedRequisition.cs rename to Yavsc/Model/Workflow/Process/NamedRequisition.cs diff --git a/Yavsc.Api/Model/Workflow/Process/Negation.cs b/Yavsc/Model/Workflow/Process/Negation.cs similarity index 100% rename from Yavsc.Api/Model/Workflow/Process/Negation.cs rename to Yavsc/Model/Workflow/Process/Negation.cs diff --git a/Yavsc.Api/Model/Workflow/Process/Rule.cs b/Yavsc/Model/Workflow/Process/Rule.cs similarity index 100% rename from Yavsc.Api/Model/Workflow/Process/Rule.cs rename to Yavsc/Model/Workflow/Process/Rule.cs diff --git a/Yavsc.Api/Model/Workflow/Projet.cs b/Yavsc/Model/Workflow/Projet.cs similarity index 100% rename from Yavsc.Api/Model/Workflow/Projet.cs rename to Yavsc/Model/Workflow/Projet.cs diff --git a/Yavsc.Api/Model/Workflow/Skill.cs b/Yavsc/Model/Workflow/Skill.cs similarity index 100% rename from Yavsc.Api/Model/Workflow/Skill.cs rename to Yavsc/Model/Workflow/Skill.cs diff --git a/Yavsc.Api/Model/Workflow/UserSkills.cs b/Yavsc/Model/Workflow/UserSkills.cs similarity index 100% rename from Yavsc.Api/Model/Workflow/UserSkills.cs rename to Yavsc/Model/Workflow/UserSkills.cs diff --git a/Yavsc.Api/Model/Workflow/hr.cs b/Yavsc/Model/Workflow/hr.cs similarity index 100% rename from Yavsc.Api/Model/Workflow/hr.cs rename to Yavsc/Model/Workflow/hr.cs diff --git a/Yavsc.Api/Model/Workflow/taskdeps.cs b/Yavsc/Model/Workflow/taskdeps.cs similarity index 100% rename from Yavsc.Api/Model/Workflow/taskdeps.cs rename to Yavsc/Model/Workflow/taskdeps.cs diff --git a/Yavsc.Api/Model/Workflow/tasks.cs b/Yavsc/Model/Workflow/tasks.cs similarity index 100% rename from Yavsc.Api/Model/Workflow/tasks.cs rename to Yavsc/Model/Workflow/tasks.cs diff --git a/Yavsc.Api/Model/Workflow/wrfiles.cs b/Yavsc/Model/Workflow/wrfiles.cs similarity index 100% rename from Yavsc.Api/Model/Workflow/wrfiles.cs rename to Yavsc/Model/Workflow/wrfiles.cs diff --git a/Yavsc.Api/Model/societe.com/CompanyInfo.cs b/Yavsc/Model/societe.com/CompanyInfo.cs similarity index 100% rename from Yavsc.Api/Model/societe.com/CompanyInfo.cs rename to Yavsc/Model/societe.com/CompanyInfo.cs