sépare le modèle client du serveur, et crée par la même la librairie Yavsc.Api

This commit is contained in:
Paul Schneider 2016-06-15 17:24:37 +02:00
commit d3ba13c0cf
101 changed files with 5754 additions and 91 deletions

View file

@ -1,37 +0,0 @@
using System.Collections.Generic;
using Microsoft.AspNet.Identity.EntityFramework;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
{
// Add profile data for application users by adding properties to the ApplicationUser class
public class ApplicationUser : IdentityUser
{
[Display(Name="AccountBalance")]
public virtual AccountBalance AccountBalance { get; set; }
[InverseProperty("Author")]
public virtual List<Blog> Posts { get; set; }
[InverseProperty("Owner")]
public virtual List<Contact> Book { get; set; }
[InverseProperty("DeviceOwner")]
public virtual List<GoogleCloudMobileDeclaration> Devices { get; set; }
[InverseProperty("Owner")]
public virtual List<Circle> Circles { get; set; }
public virtual Location PostalAddress { get; set; }
public string DedicatedGoogleCalendar { get; set; }
public override string ToString() {
return this.Id+" "+this.AccountBalance?.Credits.ToString()+this.Email+" "+this.UserName+" $"+this.AccountBalance?.Credits.ToString();
}
}
}

View file

@ -1,36 +0,0 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models;
public class GoogleCloudMobileDeclaration {
[Key]
public string RegistrationId { get; set; }
public string DeviceOwnerId { get; set; }
public string Name { get; set; }
[ForeignKeyAttribute("DeviceOwnerId")]
public virtual ApplicationUser DeviceOwner { get; set; }
// override object.Equals
public override bool Equals (object obj)
{
if (obj == null || GetType() != obj.GetType())
{
return false;
}
var other = obj as GoogleCloudMobileDeclaration;
return RegistrationId == other.RegistrationId
&& Name == other.Name;
}
// override object.GetHashCode
public override int GetHashCode()
{
return (RegistrationId+Name).GetHashCode();
}
}

View file

@ -1,11 +0,0 @@
using System;
namespace Yavsc.Models
{
public partial class passwrecovery
{
public string pkid { get; set; }
public DateTime creation { get; set; }
public string one_time_pass { get; set; }
}
}