renamed the base name of the model
This commit is contained in:
parent
6630876b38
commit
83ca421100
104 changed files with 0 additions and 0 deletions
22
Yavsc/Models/Relationship/Circle.cs
Normal file
22
Yavsc/Models/Relationship/Circle.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
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"),JsonIgnore,NotMapped]
|
||||
public virtual ApplicationUser Owner { get; set; }
|
||||
|
||||
[InverseProperty("Circle")]
|
||||
public virtual List<CircleMember> Members { get; set; }
|
||||
}
|
||||
}
|
||||
19
Yavsc/Models/Relationship/CircleMember.cs
Normal file
19
Yavsc/Models/Relationship/CircleMember.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
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; }
|
||||
}
|
||||
}
|
||||
21
Yavsc/Models/Relationship/Contact.cs
Normal file
21
Yavsc/Models/Relationship/Contact.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
public class Contact
|
||||
{
|
||||
[Required()]
|
||||
public string UserId { get; set; }
|
||||
|
||||
[Required()]
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
[ForeignKeyAttribute("OwnerId"),NotMapped]
|
||||
public virtual ApplicationUser Owner { get; set; }
|
||||
|
||||
[ForeignKeyAttribute("UserId"),NotMapped]
|
||||
public virtual ApplicationUser User { get; set; }
|
||||
}
|
||||
}
|
||||
38
Yavsc/Models/Relationship/Location.cs
Normal file
38
Yavsc/Models/Relationship/Location.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
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"),
|
||||
MaxLength(512)]
|
||||
public string Address { get; set; }
|
||||
}
|
||||
}
|
||||
12
Yavsc/Models/Relationship/PostTag.cs
Normal file
12
Yavsc/Models/Relationship/PostTag.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
public partial class PostTag
|
||||
{
|
||||
[ForeignKey("PostId")]
|
||||
public virtual Blog Post { get; set; }
|
||||
public long PostId { get; set; }
|
||||
public long TagId { get; set; }
|
||||
}
|
||||
}
|
||||
14
Yavsc/Models/Relationship/Tag.cs
Normal file
14
Yavsc/Models/Relationship/Tag.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
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; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue