add examples domain_01

This commit is contained in:
28810
2019-03-05 18:16:25 +08:00
parent 45ba67ed15
commit f9fef12d37
14 changed files with 280 additions and 1 deletions

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace domain_01.Entitys
{
/// <summary>
/// 专辑
/// </summary>
public class Album
{
public Guid Id { get; set; }
public string Name { get; set; }
public virtual ICollection<Song> Songs { get; set; }
public DateTime PublishTime { get; set; }
}
}

View File

@ -0,0 +1,11 @@
using FreeSql.DataAnnotations;
using System;
namespace domain_01.Entitys {
public class AlbumSong {
public Guid AlbumId { get; set; }
public Guid SongId { get; set; }
}
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace domain_01.Entitys
{
/// <summary>
/// 歌手
/// </summary>
public class Singer
{
public Guid Id { get; set; }
public string Nickname { get; set; }
public DateTime RegTime { get; set; } = DateTime.Now;
}
}

View File

@ -0,0 +1,25 @@
using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
namespace domain_01.Entitys {
/// <summary>
/// 歌曲
/// </summary>
public class Song {
public Guid Id { get; set; }
public Guid SingerId { get; set; }
public virtual Guid Singer { get; set; }
public string Name { get; set; }
public string Url { get; set; }
public virtual ICollection<Album> Albums { get; set; }
public DateTime RegTime { get; set; } = DateTime.Now;
}
}