sépare le modèle client du serveur, et crée par la même la librairie Yavsc.Api
This commit is contained in:
parent
47af58586f
commit
d3ba13c0cf
101 changed files with 5754 additions and 91 deletions
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
public partial class Circle {
|
||||
[Key, DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
[ForeignKey("OwnerId")]
|
||||
public virtual ApplicationUser Owner { get; set; }
|
||||
|
||||
[InverseProperty("Circle")]
|
||||
public virtual List<CircleMember> Members { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
|
||||
public partial class CircleMember
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Required]
|
||||
public virtual Circle Circle { get; set; }
|
||||
|
||||
[Required]
|
||||
public virtual ApplicationUser Member { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
public class Contact
|
||||
{
|
||||
[Required()]
|
||||
public string UserId { get; set; }
|
||||
|
||||
[Required()]
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
[ForeignKeyAttribute("OwnerId")]
|
||||
public virtual ApplicationUser Owner { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Position.
|
||||
/// </summary>
|
||||
public class Position
|
||||
{
|
||||
/// <summary>
|
||||
/// The longitude.
|
||||
/// </summary>
|
||||
[Required(),Display(Name="Longitude")]
|
||||
[Range(-180, 360.0)]
|
||||
|
||||
public double Longitude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// The latitude.
|
||||
/// </summary>
|
||||
[Required(),Display(Name="Latitude")]
|
||||
[Range(-90, 90 )]
|
||||
public double Latitude { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class Location : Position {
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
[Required(),
|
||||
Display(Name="Address")]
|
||||
public string Address { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
public partial class Tag
|
||||
{
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
[Required()]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
public partial class Tagged
|
||||
{
|
||||
[ForeignKey("Blog.Id")]
|
||||
public long postid { get; set; }
|
||||
[ForeignKey("tag.Id")]
|
||||
public long TagId { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue