API(Models)
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;
using WebApplication_API_MoNiMonth01.Dals;
namespace WebApplication_API_MoNiMonth01.Models
{
/// <summary>
/// 用户Model
/// </summary>
public class UsersInfo
{
[Key]
public int UId { get; set; }
/// <summary>
/// 账号
/// </summary>
public string ACount { get; set; }
/// <summary>
/// 密码
/// </summary>
public string Pwd { get; set; }
/// <summary>
/// 真实姓名
/// </summary>
public string RName { get; set; }
}
/// <summary>
/// 店铺Model
/// </summary>
public class StoresInfo
{
/// <summary>
/// 店铺编号
/// </summary>
[Key]
public int SId { get; set; }
/// <summary>
/// 店铺名称
/// </summary>
public string SName { get; set; }
/// <summary>
/// 掌柜
/// </summary>
public string SPeople { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 店铺图片
/// </summary>
public string SImge { get; set; }
/// <summary>
/// 店铺收藏数量
/// </summary>
public int CSNum { get; set; }
/// <summary>
/// 状态
/// </summary>
public int State { get; set; }
}
/// <summary>
/// 商品Model
/// </summary>
public class GoodsInfo
{
/// <summary>
/// 商品编号
/// </summary>
[Key]
public string GId { get; set; }
/// <summary>
/// 图片
/// </summary>
public string GImg { get; set; }
/// <summary>
///商品名称
/// </summary>
public string GName { get; set; }
/// <summary>
/// 库存
/// </summary>
public int GNum { get; set; }
/// <summary>
/// 商品收藏数量
/// </summary>
public int CGNum { get; set; }
/// <summary>
/// 店铺编号
/// </summary>
public int SId { get; set; }
public StoresInfo StoresInfoSId { get; set; }
}
/// <summary>
/// 订单Model
/// </summary>
public class OrdersInfo
{
[Key]
public int OId { get; set; }
/// <summary>
/// 商品编号
/// </summary>
public string GId { get; set; }
public GoodsInfo GoodsInfoGId { get; set; }
/// <summary>
/// 用户编号
/// </summary>
public int UId { get; set; }
public UsersInfo UsersInfoUId { get; set; }
/// <summary>
/// 购买数量
/// </summary>
public int ONum { get; set; }
/// <summary>
/// 订单状态 0:待付款 1:待发货 2:已发货 3:已退款
/// </summary>
public int OState { get; set; }
}
/// <summary>
/// 退单Model
/// </summary>
public class SaleInfo
{
[Key]
public int SId { get; set; }
/// <summary>
/// 订单编号
/// </summary>
public int OId { get; set; }
public OrdersInfo OrdersInfoOId { get; set; }
/// <summary>
/// 退回原因
/// </summary>
public string SaleCase { get; set; }
/// <summary>
/// 退货照片
/// </summary>
public string SImg { get; set; }
}
/// <summary>
/// 宝贝收藏表
/// </summary>
public class GoodsCollectInfo
{
/// <summary>
/// 收藏编号
/// </summary>
[Key]
public int CGId { get; set; }
/// <summary>
/// 商品编号
/// </summary>
public string GId { get; set; }
public GoodsInfo GoodsInfoGId { get; set; }
/// <summary>
/// 用户编号
/// </summary>
public int UId { get; set; }
public UsersInfo UsersInfoUId { get; set; }
/// <summary>
/// 状态
/// </summary>
public int CGState { get; set; }
}
/// <summary>
/// 店铺收藏表
/// </summary>
public class StroesCollectInfo
{
/// <summary>
/// 收藏编号
/// </summary>
[Key]
public int CSId { get; set; }
/// <summary>
/// 店铺编号
/// </summary>
public int SId { get; set; }
public StoresInfo StoresInfoSId { get; set; }
/// <summary>
/// 用户编号
/// </summary>
public int UId { get; set; }
public UsersInfo UsersInfoUId { get; set; }
/// <summary>
/// 状态
/// </summary>
public int CState { get; set; }
}
}