using System; using System.Collections.Generic; using Newtonsoft.Json; using Org.BouncyCastle.Asn1.X509; namespace JiaZhiQuan.Common { public class UserInfoBase { public string id { get; set; } public string alias { get; set; } public int authType { get; set; } public string authName { get; set; } public string domainTalent { get; set; } public int vip { get; set; } public string headImage { get; set; } public string description { get; set; } public string publicTags { get; set; } public string official { get; set; } public string curProvince { get; set; } /// /// 用户下载自己内容时,是否加水印,默认为0,即不加 /// public int watermark { get; set; } } public class UserInfoBaseWithFocusState : UserInfoBase { /// /// 当前用户是否关注此用户 /// public int focused { get; set; } /// /// 此用户是当前用户的粉丝 /// public int isFan { get; set; } /// /// 用户成长等级 /// public int level { get; set; } } public class UserInfoBaseWithPost : UserInfoBaseWithFocusState { public bool status { get; set; } /// /// 最新的三条笔记数据 /// public List posts { get; set; } } /// /// 笔记数据 /// public class PostThumbnails { public long id { get; set; } public long userId { get; set; } public string title { get; set; } public string thumbnails { get; set; } public int categoryType { get; set; } public int type { get; set; } } /// /// 用户后台查询 /// public class UserInfoFull : UserInfoBase { public int mpRole { get; set; } public int superior { get; set; } public string username { get; set; } } public class PostContentVideoObject { public int width { get; set; } public int height { get; set; } public string thumbnail { get; set; } public float duration { get; set; } public string url { get; set; } public string videoId { get; set; } } public class PostContentDetailObject { /// /// 0 为文本 1为图片 2为HTML /// public int type { get; set; } public string content { get; set; } public int width { get; set; } public int height { get; set; } } public class PostContentObject { public PostContentVideoObject video { get; set; } public List detail { get; set; } } public class AppVersion { /// /// 最小版本号 /// public string minVersion { get; set; } /// /// 最新版本号 /// public string latestVersion { get; set; } /// /// 最新的版本号名称 /// public string latestVersionName { get; set; } /// /// 版本更新描述 /// public string description { get; set; } /// /// 下载链接,仅Android有效 /// public string download { get; set; } } public class AppPushTaskModel { public int id { get; set; } public string title { get; set; } public string alert { get; set; } public int platform { get; set; } public string audience { get; set; } public string extras { get; set; } public DateTime expiredAt { get; set; } public int badge { get; set; } public int pushStyle { get; set; } public string pushImg { get; set; } } public class UserMessagePushConfig { /// /// 不接受所有通知 /// public bool all { get; set; } /// /// 不接受赞消息通知 /// public bool thumbsup { get; set; } /// /// 不接受新粉丝消息通知 /// public bool newfan { get; set; } /// /// 不接受评论消息通知 /// public bool comment { get; set; } /// /// 不接受@消息通知 /// public bool at { get; set; } /// /// 不接受关注人发布新内容消息通知 /// public bool focusPost { get; set; } /// /// 不接受系统通知 /// public bool sys { get; set; } /// /// 不接受推荐通知 /// public bool recommend { get; set; } /// /// 不接受关注圈子的新动态通知 /// public bool followTopic { get; set; } } public class PostCommentSetting { /// /// 禁止所有不能评论 /// public int all { get; set; } /// /// 仅粉丝可以评论 /// public int notFans { get; set; } /// /// 仅自己关注的可评论 /// public int notFocused { get; set; } /// /// 禁止非自己 /// public int notSelf { get; set; } } public class PostCommentState : PostCommentSetting { /// /// 自己能否评论 /// public int canComment { get; set; } } /// /// 用户隐私设置 /// public class UserPrivacySetting { /// /// 点赞记录是否隐藏 /// public bool likePostRecordsHidden { get; set; } /// /// 收藏记录是否隐藏 /// public bool collectPostRecordsHidden { get; set; } /// /// 关注列表是否隐藏 /// public bool focusRecordsHidden { get; set; } /// /// 粉丝列表是否隐藏 /// public bool fansHidden { get; set; } /// /// 个性化推荐是否关闭 /// public bool personalRecommend { get; set; } /// ///是否开启水印 /// public bool watermark { get; set; } public static UserPrivacySetting InstanceByIntValue(int value) { return new UserPrivacySetting { likePostRecordsHidden = (value & 0b1) == 0b1, collectPostRecordsHidden = (value & 0b10) == 0b10, focusRecordsHidden = (value & 0b100) == 0b100, fansHidden = (value & 0b1000) == 0b1000, personalRecommend = (value & 0b10000) == 0b10000, watermark = (value & 0b100000) == 0b100000, }; } public int GetIntValue() { return (likePostRecordsHidden ? 0b1 : 0b0) | (collectPostRecordsHidden ? 0b10 : 0b0) | (focusRecordsHidden ? 0b100 : 0b0) | (fansHidden ? 0b1000 : 0b0) | (personalRecommend ? 0b10000 : 0b0) | (watermark ? 0b100000 : 0b0); } } public class UserTagModel { public DateTime createDate { get; set; } public string tag { get; set; } public int count { get; set; } public double hot { get; set; } } public class VideoUploadState { /// /// 0 待上传或上传中 1 完成 /// public int uploadState { get; set; } /// /// 如果 长宽为0,则表示视频分析未完成 /// public int width { get; set; } public int height { get; set; } } public class DateRange { public string startDate { get; set; } public string endDate { get; set; } } #region 活动配置Model /// /// 活动答题的配置 /// public class ActivityDtConfig { /// /// 活动头图,一张 /// public string headerImage { get; set; } /// /// 一天内最多可答题次数 /// public int totalTimesPerDay { get; set; } /// /// 答题最大时间 /// public float maxSecs { get; set; } = 1999.99f; /// /// 每次的题目数量 /// public int qaCount { get; set; } /// /// 题库类型编码列表 /// public List qaTagIds { get; set; } /// /// 每次答对数量与奖励的对应关系,如果无对应关系表示不奖励价值币 /// public Dictionary correctCountAndPointsMap { get; set; } } /// /// 活动晒笔记的配置 /// public class ActivitySbjConfig { /// /// 活动一天可参与多少次 /// public int totalTimesPerDay { get; set; } = 1; /// /// 0 不限 1 仅图文 2 仅视频 /// public int contentType { get; set; } = 0; /// /// 0 不限 大于0 则限定为某一个topic下的 /// public int topicId { get; set; } /// /// 奖励的价值币数量 /// public int points { get; set; } /// /// 活动头图,一张 /// public string headerImage { get; set; } /// /// 活动页面展示的标题 /// public string title { get; set; } /// /// 活动页面展示的描述 /// public string description { get; set; } } /// /// 活动邀请好友的配置 /// public class ActivityYqhyConfig { /// /// 全局背景色 /// public string globalBackgroundColor { get; set; } /// /// 活动头图,一张 /// public string headerImage { get; set; } /// /// 活动尾图,多张 /// public List footerImages { get; set; } /// /// 活动配置的奖励项列表 /// public List rewardIds { get; set; } /// /// 排行榜数据一致时,0 排名并列 1 率先完成的排名在前,ID越低越优先 /// public int orderType { get; set; } /// /// 排行榜结构,是否可以展开 /// public bool expandable { get; set; } /// /// 默认显示多少名(条) /// public int defaultVisibleCount { get; set; } /// /// 展开后显示多少名(条) /// public int expandedVisibleCount { get; set; } /// /// 是否将“获利邀请”算入活动数据 /// public bool ignoreProfit { get; set; } } /// /// 活动每日话题配置中话题配置项 /// public class ActivityMrhtConfigTopicItem { /// /// 话题编号 /// public int topicId { get; set; } /// /// 活动哪一天 /// public DateTime date { get; set; } } /// /// 活动每日话题的配置 /// public class ActivityMrhtConfig { /// /// 全局背景色 /// public string globalBackgroundColor { get; set; } /// /// 活动头图,一张 /// public string headerImage { get; set; } /// /// 活动尾图,多张 /// public List footerImages { get; set; } /// /// 活动配置的奖励项列表 /// public List rewardIds { get; set; } /// /// 排行榜数据一致时,0 排名并列 1 率先完成的排名在前,ID越低越优先 /// public int orderType { get; set; } /// /// 排行榜结构,是否可以展开 /// public bool expandable { get; set; } /// /// 默认显示多少名 /// public int defaultVisibleCount { get; set; } /// /// 展开后显示多少名 /// public int expandedVisibleCount { get; set; } /// /// 是否开启【看看别人怎么写】 /// public bool recommendPosts { get; set; } /// /// 活动日对应的话题配置,如果找不到,则查找前一个日期的话题 /// public List topics { get; set; } } /// /// 活动阅读量大比拼的配置 /// public class ActivityYdldbpConfig { /// /// 全局背景色 /// public string globalBackgroundColor { get; set; } /// /// 活动头图,一张 /// public string headerImage { get; set; } /// /// 活动尾图,多张 /// public List footerImages { get; set; } /// /// 活动配置的奖励项列表 /// public List rewardIds { get; set; } /// /// 排行榜结构,是否可以展开 /// public bool expandable { get; set; } /// /// 默认显示多少名 /// public int defaultVisibleCount { get; set; } /// /// 展开后显示多少名 /// public int expandedVisibleCount { get; set; } } public class ActivityDakaConfig { /// /// 全局背景色 /// public string globalBackgroundColor { get; set; } /// /// 活动头图,一张 /// public string headerImage { get; set; } /// /// 活动尾图,多张 /// public List footerImages { get; set; } /// /// 终极抽奖是否启用 /// public bool finalDrawEnabled { get; set; } /// /// 终极抽奖开始时间 /// public DateTime? finalDrawStartTime { get; set; } /// /// 终极抽奖结束时间 /// public DateTime? finalDrawEndTime { get; set; } /// /// 普通抽奖模板编号 /// public int normalTempId { get; set; } /// /// 普通抽奖面板图片 /// public string normalPanelImage { get; set; } /// /// 普通抽奖指针图片 /// public string normalIndicatorImage { get; set; } /// /// 打卡一次获取普通抽奖次数 /// public int normalDrawTimes { get; set; } = 1; /// /// 终极抽奖模板编号 /// public int finalTempId { get; set; } /// /// 终极抽奖面板图片 /// public string finalPanelImage { get; set; } /// /// 终极抽奖指针图片 /// public string finalIndicatorImage { get; set; } /// /// 价值币购买次数是否开启 /// public bool boughtEnabled { get; set; } /// /// 一次购买所需价值币 /// public int points { get; set; } /// /// 单日最大购买次数 /// public int maxBoughtTimesPerDay { get; set; } /// /// 奖池列表图片 /// public string prizeListImage { get; set; } /// /// 最终奖池列表图片 /// public string finalPrizeListImage { get; set; } } #endregion 活动配置Model /// /// 网页爬取行情程序,在Redis存入的实时行情数据项结构 /// public class QTLiveData { public string 名称 { get; set; } public DateTime 数据刷新时间 { get; set; } public Decimal? 当前价格 { get; set; } public Decimal? 今开 { get; set; } public Decimal? 昨收 { get; set; } public Decimal? 最高 { get; set; } public Decimal? 最低 { get; set; } /// /// 百分比 /// public Decimal? 涨跌幅 { get; set; } /// /// 涨跌多少 /// public Decimal? 涨跌额 { get; set; } /// /// 百分比 /// public Decimal? 换手 { get; set; } /// /// 百分比 /// public Decimal? 振幅 { get; set; } public string 成交量 { get; set; } public string 成交额 { get; set; } } /// /// 从AKShare获取的停牌信息 /// public class QTSuspensionData { public string 代码 { get; set; } public string 名称 { get; set; } public DateTime? 停牌时间 { get; set; } public DateTime? 停牌截止时间 { get; set; } /// /// 如果值为【盘中停牌】,则表示仅只是部分交易时段停牌,当天还是交易的 /// public string 停牌期限 { get; set; } public string 停牌原因 { get; set; } public string 所属市场 { get; set; } public DateTime? 预计复牌时间 { get; set; } } /// /// 奖励发放实体 /// public class ReceiveReward { /// /// 来源id /// public int sourceId { get; set; } /// /// 来源名称 /// public string sourceName { get; set; } /// /// 商品id /// public long goodsId { get; set; } /// /// 商品类型 /// public int goodsType { get; set; } /// /// 商品数量 /// public int goodsQuantity { get; set; } /// /// 商品缩略图 /// public string goodsThumbnail { get; set; } /// /// 商品名称 /// public string goodsTitle { get; set; } /// /// 用户id /// public long userId { get; set; } /// /// 奖励id 如果是打卡,n_activity_drawpool_temp_goods表的id /// public int rewardId { get; set; } /// /// 是否支付宝红包 /// public bool isAlipayRed { get; set; } } public class SysMessageRecordTask { public int id { get; set; } public int messageId { get; set; } public string cont { get; set; } public DateTime execTime { get; set; } public int state { get; set; } public DateTime createAt { get; set; } } public class SysMessageRecord { public int id { get; set; } public string title { get; set; } public string pushTitle { get; set; } public string targets { get; set; } public string content { get; set; } public string pushContent { get; set; } public DateTime createAt { get; set; } public DateTime pushSendAt { get; set; } public string pushStyle { get; set; } public string pushImg { get; set; } public string image { get; set; } public string actionType { get; set; } public string actionSubType { get; set; } public string actionLink { get; set; } } }