28 lines
614 B
C#
28 lines
614 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace CampusErrand.Models;
|
|
|
|
/// <summary>
|
|
/// 门店 Banner 表
|
|
/// </summary>
|
|
public class ShopBanner
|
|
{
|
|
[Key]
|
|
public int Id { get; set; }
|
|
|
|
/// <summary>门店 ID</summary>
|
|
public int ShopId { get; set; }
|
|
|
|
/// <summary>图片地址</summary>
|
|
[MaxLength(512)]
|
|
public string ImageUrl { get; set; } = string.Empty;
|
|
|
|
/// <summary>排序权重</summary>
|
|
public int SortOrder { get; set; }
|
|
|
|
// 导航属性
|
|
[ForeignKey(nameof(ShopId))]
|
|
public Shop? Shop { get; set; }
|
|
}
|