7 changed files with 533 additions and 2 deletions
@ -0,0 +1,452 @@ |
|||||
|
using FreeSql.DataAnnotations; |
||||
|
|
||||
|
namespace SiNan.Server.Model.Db |
||||
|
{ |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// sku表
|
||||
|
/// </summary>
|
||||
|
[ Table(Name = "skus", DisableSyncStructure = true)] |
||||
|
public partial class Skus { |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Id
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = 50, IsPrimary = true, IsNullable = false)] |
||||
|
public string Id { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 加购物车数量
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? AddCardCount { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 加购人数
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? AddCardMember { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 加购率
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(11,2)")] |
||||
|
public decimal? AddCardRate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 点击次数
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? ClickCount { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 点击率
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(11,2)")] |
||||
|
public decimal? ClickRate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 栏目订单
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? ColumnOrder { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 转化率
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(11,2)")] |
||||
|
public decimal? ConversionRate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 收费流量
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? CostUv { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 创建时间
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "datetime")] |
||||
|
public DateTime CreateTime { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 创建人Id
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = 50)] |
||||
|
public string CreatorId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 创建人
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = 50, IsNullable = false)] |
||||
|
public string CreatorRealName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 盈亏小节
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(19,4)")] |
||||
|
public decimal? EarningsPrice { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 曝光量
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? Exposure { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 快车点击率
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(11,2)")] |
||||
|
public decimal? ExposureClickRate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 快车点击
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? ExpressClick { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 快车花费
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(19,4)")] |
||||
|
public decimal? ExpressCost { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 快车展现
|
||||
|
/// </summary>
|
||||
|
|
||||
|
public decimal? ExpressExposure { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 快车订单
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? ExpressOrder { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 快车成交额
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(19,4)")] |
||||
|
public decimal? ExpressPayPrice { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 快车人均点击
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(11,4)")] |
||||
|
public decimal? ExpressPeopleClick { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 快车访客
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? ExpressUv { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 免费订单
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? FreeOrder { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 免费成交额
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(19,4)")] |
||||
|
public decimal? FreePayPrice { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 免费流量
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? FreeUv { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 首页访客
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? IndexUv { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否收藏
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "tinyint")] |
||||
|
public sbyte? IsStar { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新品交易榜单
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? NewSaleTopIndex { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 新品人气榜单
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? NewUvTopIndex { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 一级类目
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = 50)] |
||||
|
public string OneCatId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 其他订单
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? OtherOrder { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 其他成交额
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(19,4)")] |
||||
|
public decimal? OtherPrice { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 其他访客
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? OtherUv { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 流量路径
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = -2)] |
||||
|
public string PathList { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 下单商品件数
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? PayItemCount { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 下单客户数
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? PayMember { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 下单数
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? PayOrder { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 下单金额
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(19,4)")] |
||||
|
public decimal? PayPrice { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 下单转化率
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(11,2)")] |
||||
|
public decimal? PayRate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 毛利
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(19,4)")] |
||||
|
public decimal? Profits { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 流量
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? Pv { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 真实转化率
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(11,2)")] |
||||
|
public decimal? RealConversionRate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 真实成交额
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(19,4)")] |
||||
|
public decimal? RealPrice { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 成交客户数
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? SaleMember { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 成交金额
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(19,4)")] |
||||
|
public decimal? SalePrice { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 成交转化率
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(11,2)")] |
||||
|
public decimal? SaleRate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 成交件数
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? Sales { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 交易榜单排名
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? SaleTopIndex { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 风向标
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(11,2)")] |
||||
|
public decimal? ScoreRank { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刷单花费
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(19,4)")] |
||||
|
public decimal? SdCost { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刷单单量
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? SdOrder { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 刷单成交额
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(19,4)")] |
||||
|
public decimal? SdPrice { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 搜索访客
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? SearchUv { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 二级类目
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = 50)] |
||||
|
public string SecondCatId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 自主订单
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? SelfOrder { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 店铺Id
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = 50)] |
||||
|
public string ShopsId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 海投点击
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? ShotgunClick { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 海投点击率
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(11,2)")] |
||||
|
public decimal? ShotgunClickRate { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 海投花费
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(19,4)")] |
||||
|
public decimal? ShotgunCost { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 海投展现
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(11,2)")] |
||||
|
public decimal? ShotgunExposure { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 海投订单
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? ShotgunOrder { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 海投成交额
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(19,4)")] |
||||
|
public decimal? ShotgunPayPrice { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 海投人均点击
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(11,4)")] |
||||
|
public decimal? ShotgunPeopleClick { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 海投访客
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? ShotgunUv { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// sku
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = 50)] |
||||
|
public string Sku { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Spu
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = 50)] |
||||
|
public string Spu { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// SpuId
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = 50)] |
||||
|
public string SpusId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 推荐访客
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? StarUv { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 三级类目
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = 50)] |
||||
|
public string ThirdCatId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 标题
|
||||
|
/// </summary>
|
||||
|
[Column(StringLength = -1)] |
||||
|
public string Title { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 总花费
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "decimal(19,4)")] |
||||
|
public decimal? TotalCost { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 访客
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? Uv { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 人气榜单排名
|
||||
|
/// </summary>
|
||||
|
[Column(DbType = "int")] |
||||
|
public int? UvTopIndex { get; set; } |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,67 @@ |
|||||
|
using FreeSql.DatabaseModel;@{ |
||||
|
var gen = Model as RazorModel; |
||||
|
|
||||
|
Func<string, string> GetAttributeString = attr => { |
||||
|
if (string.IsNullOrEmpty(attr)) return ""; |
||||
|
return string.Concat(", ", attr.Trim('[', ']')); |
||||
|
}; |
||||
|
Func<string, string> GetDefaultValue = defval => { |
||||
|
if (string.IsNullOrEmpty(defval)) return ""; |
||||
|
return " = " + defval + ";"; |
||||
|
}; |
||||
|
}@{ |
||||
|
switch (gen.fsql.Ado.DataType) { |
||||
|
case FreeSql.DataType.PostgreSQL: |
||||
|
@:using System; |
||||
|
@:using System.Collections; |
||||
|
@:using System.Collections.Generic; |
||||
|
@:using System.Linq; |
||||
|
@:using System.Reflection; |
||||
|
@:using System.Threading.Tasks; |
||||
|
@:using Newtonsoft.Json; |
||||
|
@:using FreeSql.DataAnnotations; |
||||
|
@:using System.Net; |
||||
|
@:using Newtonsoft.Json.Linq; |
||||
|
@:using System.Net.NetworkInformation; |
||||
|
@:using NpgsqlTypes; |
||||
|
@:using Npgsql.LegacyPostgis; |
||||
|
break; |
||||
|
case FreeSql.DataType.SqlServer: |
||||
|
case FreeSql.DataType.MySql: |
||||
|
default: |
||||
|
@:using System; |
||||
|
@:using System.Collections; |
||||
|
@:using System.Collections.Generic; |
||||
|
@:using System.Linq; |
||||
|
@:using System.Reflection; |
||||
|
@:using System.Threading.Tasks; |
||||
|
@:using Newtonsoft.Json; |
||||
|
@:using FreeSql.DataAnnotations; |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
namespace @gen.NameSpace { |
||||
|
|
||||
|
@if (string.IsNullOrEmpty(gen.table.Comment) == false) { |
||||
|
@:/// <summary> |
||||
|
@:/// @gen.table.Comment.Replace("\r\n", "\n").Replace("\n", "\r\n /// ") |
||||
|
@:/// </summary> |
||||
|
} |
||||
|
[JsonObject(MemberSerialization.OptIn)@GetAttributeString(gen.GetTableAttribute())] |
||||
|
public partial class @gen.GetCsName(gen.FullTableName) { |
||||
|
|
||||
|
@foreach (var col in gen.columns) { |
||||
|
|
||||
|
if (string.IsNullOrEmpty(col.Comment) == false) { |
||||
|
@:/// <summary> |
||||
|
@:/// @col.Comment.Replace("\r\n", "\n").Replace("\n", "\r\n /// ") |
||||
|
@:/// </summary> |
||||
|
} |
||||
|
@:@("[JsonProperty" + GetAttributeString(gen.GetColumnAttribute(col, true)) + "]") |
||||
|
@:public @gen.GetCsType(col) @gen.GetCsName(col.Name) { get; set; }@GetDefaultValue(gen.GetColumnDefaultValue(col, false)) |
||||
|
@: |
||||
|
} |
||||
|
} |
||||
|
@gen.GetMySqlEnumSetDefine() |
||||
|
} |
@ -0,0 +1,2 @@ |
|||||
|
|
||||
|
FreeSql.Generator -Razor "__razor.cshtml.txt" -NameOptions 1,0,0,0 -NameSpace SiNan.Server.Model.Db -DB "MySql,data source=rm-bp1508okrh23710yfao.mysql.rds.aliyuncs.com;user id=qyroot;password=kaicn1132+-;initial catalog=jdxx;charset=utf8;sslmode=none;" -FileName "{name}.cs" |
Loading…
Reference in new issue