using System; using System.Collections.Generic; using Dapper.Contrib.Extensions; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; using Newtonsoft.Json.Linq; public class DbTableClass { [Table("instagramKolView")] public class instagramKolView { [JsonIgnore] [Key] public int instagram_sn { get; set; } public string instagram_uid { get; set; } public string kol_uid { get; set; } public string kolMedia_uid { get; set; } public string instagram_name { get; set; } public string instagram_pic { get; set; } public string instagram_revoke { get; set; } public int instagram_fansNum { get; set; } public int instagram_followNum { get; set; } public double instagram_postActive { get; set; } public double instagram_reelsActive { get; set; } public DateTime instagram_updatedate { get; set; } public string kolMedia_url { get; set; } public string kol_photo { get; set; } } [Table("instagramDetail")] public class instagramDetail { [JsonIgnore] [Key] public int instagramDetail_sn { get; set; } public string instagram_uid { get; set; } = ""; public string instagramDetail_type { get; set; } = ""; public string instagramDetail_title { get; set; } = ""; public string instagramDetail_photo { get; set; } = ""; public string instagramDetail_shortcode { get; set; } = ""; public string instagramDetail_date { get; set; } = ""; public int instagramDetail_viewNum { get; set; } = 0; public int instagramDetail_likeNum { get; set; } = 0; public int instagramDetail_commentNum { get; set; } = 0; public string instagramDetail_ispinned { get; set; } = "N"; public DateTime instagramDetail_createdate { get; set; } = DateTime.Now; } [Table("instagram")] public class instagram { [JsonIgnore] [Key] public int instagram_sn { get; set; } public string instagram_uid { get; set; } = ""; public string kol_uid { get; set; } = ""; public string kolMedia_uid { get; set; } = ""; public string instagram_name { get; set; } = ""; public string instagram_pic { get; set; } = ""; public string instagram_revoke { get; set; } = "N"; public int instagram_fansNum { get; set; } = 0; public int instagram_followNum { get; set; } = 0; public double instagram_postActive { get; set; } = 0.0; public double instagram_reelsActive { get; set; } = 0.0; public DateTime instagram_updatedate { get; set; } = DateTime.Now; } [Table("facebookKolView")] public class facebookKolView { [JsonIgnore] [Key] public int facebook_sn { get; set; } public string facebook_uid { get; set; } = ""; public string kol_uid { get; set; } = ""; public string kolMedia_uid { get; set; } = ""; public string facebook_name { get; set; } = ""; public string facebook_revoke { get; set; } = "N"; public int facebook_fansNum { get; set; } = 0; public int facebook_5_likesNum { get; set; } = 0; public int facebook_5_msgNum { get; set; } = 0; public int facebook_5_shareNum { get; set; } = 0; public double facebook_active { get; set; } = 0.0; public DateTime facebook_updatedate { get; set; } = DateTime.Now; public string kol_name { get; set; } = ""; public string kol_photo { get; set; } = ""; public string kolMedia_url { get; set; } = ""; } [Table("facebookDetail")] public class facebookDetail { [JsonIgnore] [Key] public int facebookDetail_sn { get; set; } public string facebook_uid { get; set; } = ""; public string facebookDetail_publishedAt { get; set; } = ""; public int facebookDetail_likeCount { get; set; } = 0; public int facebookDetail_msgCount { get; set; } = 0; public int facebookDetail_shareCount { get; set; } = 0; public DateTime facebookDetail_createdate { get; set; } =DateTime.Now; } [Table("facebook")] public class facebook { [JsonIgnore] [Key] public int facebook_sn { get; set; } public string facebook_uid { get; set; } = ""; public string kol_uid { get; set; } = ""; public string kolMedia_uid { get; set; } = ""; public string facebook_name { get; set; } = ""; public string facebook_revoke { get; set; } = "N"; public int facebook_fansNum { get; set; } = 0; public int facebook_5_likesNum { get; set; } = 0; public int facebook_5_msgNum { get; set; } = 0; public int facebook_5_shareNum { get; set; } = 0; public double facebook_active { get; set; } = 0.0; public DateTime facebook_updatedate { get; set; } = DateTime.Now; } [Table("youtubeDetail")] public class youtubeDetail { [JsonIgnore] [Key] public int youtubeDetail_sn { get; set; } public string youtube_uid { get; set; } = ""; public string youtubeDetail_uid { get; set; } = ""; public DateTime? youtubeDetail_publishedAt { get; set; } public string youtubeDetail_title { get; set; } = ""; public string youtubeDetail_description { get; set; } = ""; public string youtubeDetail_thumbnails { get; set; } = ""; public string youtubeDetail_videoId { get; set; } = ""; public int youtubeDetail_viewCount { get; set; } = 0; public int youtubeDetail_likeCount { get; set; } = 0; public int youtubeDetail_favoriteCount { get; set; } = 0; public int youtubeDetail_commentCount { get; set; } = 0; [JsonIgnore] public string youtubeDetail_json { get; set; } = ""; public DateTime youtubeDetail_createdate { get; set; } = DateTime.Now; } [Table("youtube")] public class youtube { [JsonIgnore] [Key] public int youtube_sn { get; set; } public string youtube_uid { get; set; } = ""; public string kol_uid { get; set; } = ""; public string kolMedia_uid { get; set; } = ""; public string youtube_name { get; set; } = ""; public string youtube_account { get; set; } = ""; public string youtube_revoke { get; set; } = "N"; public int youtube_subscriberCount { get; set; } = 0; public int youtube_viewCount { get; set; } = 0; public int youtube_avgViewCount { get; set; } = 0; public string youtube_photo { get; set; } = ""; [JsonIgnore] public string youtube_json { get; set; } = ""; public DateTime youtube_updateTime { get; set; } = DateTime.Now; } [Table("updateLog")] public class updateLog { [JsonIgnore] [Key] public int updateLog_sn { get; set; } public string updateLog_type { get; set; } = ""; public string updateLog_kol_uid { get; set; } = ""; public string updateLog_kolMedia_uid { get; set; } = ""; public string updateLog_kolMedia_accountName { get; set; } = ""; public string updateLog_kolMedia_displayName { get; set; } = ""; public string updateLog_result { get; set; } = "faild"; public string updateLog_uid { get; set; } = ""; [JsonIgnore] public string updateLog_text { get; set; } = ""; public DateTime updateLog_updateTime { get; set; } = DateTime.Now; } [Table("kolProjectView")] public class kolProjectView { public string kol_name { get; set; } = ""; public string kol_uid { get; set; } = ""; public string kol_descript { get; set; } = ""; public string kol_photo { get; set; } = ""; public string project_uid { get; set; } = ""; public string kolProject_uid { get; set; } = ""; public string kolProject_isExec { get; set; } = ""; public string kolProject_noExecReason { get; set; } = ""; public string kolProject_memo { get; set; } = ""; public string user_uid { get; set; } = ""; public string user_name { get; set; } = ""; public DateTime kolProject_modifydate { get; set; } public string optionItem_uid { get; set; } = ""; public string mediaItem_uid { get; set; } = ""; public string kolProjectPrice_date { get; set; } = ""; public int kolProjectPrice_cost { get; set; } public string kolProjectPrice_num { get; set; } = ""; public string kolProjectPrice_other { get; set; } = ""; public string mediaItem_name { get; set; } = ""; public string optionItem_name { get; set; } = ""; public int optionItem_order { get; set; } = 0; } [Table("kolfiles")] public class kolfiles { [JsonIgnore] [Key] public int file_sn { get; set; } public string file_uid { get; set; } = ""; public string file_mimeType { get; set; } = ""; public string file_originName { get; set; } = ""; public string file_path { get; set; } = ""; public DateTime file_createdate { get; set; } = DateTime.Now; } [Table("kolProjectFile")] public class kolProjectFile { [JsonIgnore] [Key] public int kolProjectFile_sn { get; set; } public string kolProjectFile_uid { get; set; } = ""; public string kolProject_uid { get; set; } = ""; public string file_uid { get; set; } = ""; public string kolProjectFile_path { get; set; } = ""; public string kolProjectFile_originFileName { get; set; } = ""; public DateTime kolProjectFile_createdate { get; set; } = DateTime.Now; } [Table("kolProjectEvaluate")] public class kolProjectEvaluate { [JsonIgnore] [Key] public int kolProjectEvaluate_sn { get; set; } public string kol_uid { get; set; } = ""; public string project_uid { get; set; } = ""; public string kolProject_uid { get; set; } = ""; public string kolProjectEvaluate_text { get; set; } = ""; } [Table("kolProjectPriceDetail")] public class kolProjectPriceDetail { [JsonIgnore] [Key] public int kolProjectPrice_sn { get; set; } public string kolProjectPrice_uid { get; set; } = ""; public string kolProject_uid { get; set; } = ""; public string optionItem_uid { get; set; } = ""; public string mediaItem_uid { get; set; } = ""; public string kolProjectPrice_other { get; set; } = ""; public string kolProjectPrice_num { get; set; } = ""; public int kolProjectPrice_cost { get; set; } = 0; public string kolProjectPrice_date { get; set; } = ""; public DateTime kolProjectPrice_createdate { get; set; } = DateTime.Now; public DateTime kolProjectPrice_modifydate { get; set; } = DateTime.Now; public string optionItem_name { get; set; } = ""; public string mediaItem_name { get; set; } = ""; } [Table("kolProjectPrice")] public class kolProjectPrice { [JsonIgnore] [Key] public int kolProjectPrice_sn { get; set; } public string kolProjectPrice_uid { get; set; } = ""; public string kolProject_uid { get; set; } = ""; public string optionItem_uid { get; set; } = ""; public string mediaItem_uid { get; set; } = ""; public string kolProjectPrice_other { get; set; } = ""; public string kolProjectPrice_num { get; set; } = ""; public int kolProjectPrice_cost { get; set; } = 0; public string kolProjectPrice_date { get; set; } = ""; public DateTime kolProjectPrice_createdate { get; set; } = DateTime.Now; public DateTime kolProjectPrice_modifydate { get; set; } = DateTime.Now; } [Table("kolProjectLink")] public class kolProjectLink { [JsonIgnore] [Key] public int kolProjectLink_sn { get; set; } public string kolProjectLink_uid { get; set; } = ""; public string kolProject_uid { get; set; } = ""; public string kolProjectLink_url { get; set; } = ""; public string kolProjectLink_text { get; set; } = ""; public DateTime kolProjectLink_createdate { get; set; } = DateTime.Now; } [Table("kolProjectImage")] public class kolProjectImage { [JsonIgnore] [Key] public int kolProjectImage_sn { get; set; } public string kolProjectImage_uid { get; set; } = ""; public string kolProject_uid { get; set; } = ""; public string kolProjectImage_photo { get; set; } = ""; public string kolProjectImage_desc { get; set; } = ""; public DateTime kolProjectImage_createdate { get; set; } = DateTime.Now; } [Table("kolProject")] public class kolProject { [JsonIgnore] [Key] public int kolProject_sn { get; set; } public string kolProject_uid { get; set; } = ""; public string kol_uid { get; set; } = ""; public string project_uid { get; set; } = ""; public string kolProject_isExec { get; set; } = "N"; public string kolProject_noExecReason { get; set; } = ""; public string kolProject_quility { get; set; } = ""; public string kolProject_memo { get; set; } = ""; public string user_uid { get; set; } = ""; public string user_name { get; set; } = ""; public DateTime kolProject_createdate { get; set; } = DateTime.Now; public DateTime kolProject_modifydate { get; set; } = DateTime.Now; } [Table("mediaItem")] public class mediaItem { [JsonIgnore] [Key] public int mediaItem_sn { get; set; } public string mediaItem_uid { get; set; } = ""; public string optionItem_uid { get; set; } = ""; public string mediaItem_name { get; set; } = ""; public string mediaItem_ishide { get; set; } = "N"; public int mediaItem_order { get; set; } = 999; public DateTime mediaItem_createdate { get; set; } = DateTime.Now; public DateTime mediaItem_modifydate { get; set; } = DateTime.Now; public string mediaItem_userId { get; set; } = ""; } [Table("kolTag")] public class kolTag { [JsonIgnore] [Key] public int kolTag_sn { get; set; } public string kolTag_uid { get; set; } = ""; public string kol_uid { get; set; } = ""; public string tag_uid { get; set; } = ""; } [Table("tags")] public class tags { [JsonIgnore] [Key] public int tag_sn { get; set; } public string tag_uid { get; set; } = ""; public string tag_text { get; set; } = ""; } [Table("files")] public class files { [JsonIgnore] [Key] public int file_sn { get; set; } public string file_uid { get; set; } public string file_target_uid { get; set; } public string file_url { get; set; } public string file_filename { get; set; } public string file_contenttype { get; set; } public string file_del { get; set; } public string file_create_user_uid { get; set; } public string file_modify_user_uid { get; set; } public DateTime file_createdate { get; set; } public DateTime file_modifydate { get; set; } } [Table("quotation")] public class quotation { [JsonIgnore] [Key] public int quotation_sn { get; set; } public string quotation_serial { get; set; } public string quotation_name { get; set; } public int quotation_year { get; set; } public string dept_uid { get; set; } public int quotation_budget { get; set; } public string company_uid { get; set; } public string company_serial { get; set; } public string quotation_ps { get; set; } public string quotation_paperfile { get; set; } public int quotation_version { get; set; } public string quotation_del { get; set; } public string quotation_invalid { get; set; } public string quotation_create_user_uid { get; set; } public DateTime quotation_createdate { get; set; } public DateTime quotation_modifydate { get; set; } } [Table("project")] public class project { [JsonIgnore] [Key] public int project_sn { get; set; } public string project_uid { get; set; } = ""; public string project_isPrm { get; set; } = "N"; public string project_prmSerial { get; set; } = ""; public string project_name { get; set; } = ""; public int project_year { get; set; } = 1900; public int project_month { get; set; } = 1; public string project_isExec { get; set; } = "N"; public string project_reason { get; set; } = ""; public DateTime project_createdate { get; set; } = DateTime.Now; public DateTime project_modifydate { get; set; }= DateTime.Now; public string project_create_id { get; set; } = ""; public string project_modify_id { get; set; } = ""; } [Table("kol")] public class kol { [JsonIgnore] [Key] public int kol_sn { get; set; } public string kol_uid { get; set; } = ""; public string kol_name { get; set; } = ""; public string kol_photo { get; set; } = ""; public string kol_descript { get; set; } = ""; public double kol_men_ratio { get; set; } = 0; public double kol_women_ratio { get; set; } = 0; public double kol_13_17 { get; set; } = 0; public double kol_18_24 { get; set; } = 0; public double kol_25_34 { get; set; } = 0; public double kol_35_44 { get; set; } = 0; public double kol_45_54 { get; set; } = 0; public double kol_55_64 { get; set; } = 0; public double kol_65 { get; set; } = 0; public string kol_contact1 { get; set; } = ""; public string kol_contact2 { get; set; } = ""; public DateTime kol_createdate { get; set; } = DateTime.Now; public DateTime kol_modifydate { get; set; } = DateTime.Now; public string kol_create_userId { get; set; } = ""; public string kol_modify_userId { get; set; } = ""; } [Table("kolCooperateType")] public class kolCooperateType { [JsonIgnore] [Key] public int kolCooperateType_sn { get; set; } public string kolCooperateType_uid { get; set; } = ""; public string kol_uid { get; set; } = ""; public string project_uid { get; set; } = ""; public string kolProject_uid { get; set; } = ""; public string option_uid { get; set; } = ""; public string optionItem_uid { get; set; } = ""; } [Table("kolFansType")] public class kolFansType { [JsonIgnore] [Key] public int kolFansType_sn { get; set; } public string kolFansType_uid { get; set; } = ""; public string kol_uid { get; set; } = ""; public string option_uid { get; set; } = ""; public string optionItem_uid { get; set; } = ""; } [Table("kolMakeup")] public class kolMakeup { [JsonIgnore] [Key] public int kolMakeup_sn { get; set; } public string kolMakeup_uid { get; set; } = ""; public string kol_uid { get; set; } = ""; public string option_uid { get; set; } = ""; public string optionItem_uid { get; set; } = ""; } [Table("kolMedia")] public class kolMedia { [JsonIgnore] [Key] public int kolMedia_sn { get; set; } public string kolMedia_uid { get; set; } = ""; public string kol_uid { get; set; } = ""; public string option_uid { get; set; } = ""; public string optionItem_uid { get; set; } = ""; public string kolMedia_url { get; set; } = ""; public string kolMedia_displayName { get; set; } = ""; public string kolMedia_accountName { get; set; } = ""; public int kolMedia_fansNum { get; set; } = 0; } [Table("kolStyle")] public class kolStyle { [JsonIgnore] [Key] public int kolStyle_sn { get; set; } public string kolStyle_uid { get; set; } = ""; public string kol_uid { get; set; } = ""; public string option_uid { get; set; } = ""; public string optionItem_uid { get; set; } = ""; } [Table("optionItem")] public class optionItem { [JsonIgnore] [Key] public int optionItem_sn { get; set; } public string option_uid { get; set; } = ""; public string optionItem_uid { get; set; } = ""; public string optionItem_name { get; set; } = ""; public string optionItem_ishide { get; set; } = "N"; public int optionItem_order { get; set; } = 999; public DateTime optionItem_createdate { get; set; } = DateTime.Now; public DateTime optionItem_modifydate { get; set; } = DateTime.Now; public string optionItem_userId { get; set; } = ""; } [Table("option")] public class option { [JsonIgnore] [Key] public int option_sn { get; set; } public string option_uid { get; set; } = ""; public string option_name { get; set; } = ""; public string option_ishide { get; set; } = "N"; public DateTime option_createdate { get; set; } = DateTime.Now; public DateTime option_modifydate { get; set; } = DateTime.Now; } [Table("token")] public class token { [JsonIgnore] [Key] public int token_sn { get; set; } public string token_key { get; set; } = ""; public string user_uid { get; set; } = ""; public string user_id { get; set; } = ""; public string token_isremember { get; set; } = "N"; public DateTime token_createdate { get; set; } = DateTime.Now; public DateTime token_expireddate { get; set; } = DateTime.Now.AddMinutes(20); } [Table("users")] public class user { [JsonIgnore] [Key] public int user_sn { get; set; } public string user_uid { get; set; } = ""; public string user_id { get; set; } = ""; public string user_name { get; set; } = ""; public string user_email { get; set; } = ""; public string user_onjob { get; set; } = "N"; public string user_type { get; set; } = "N"; public string user_pwd { get; set; } = ""; public string user_perm { get; set; } = "user"; public string user_pic { get; set; } = ""; public string user_ishidden { get; set; } = "N"; public DateTime user_createdate { get; set; } = DateTime.Now; public string user_lastlogintime { get; set; } = ""; } [Table("new_userdata")] public class new_userdata { [JsonIgnore] [Key] public int usersn { get; set; } public string userid { get; set; } = ""; public string userpw { get; set; } = ""; public string username { get; set; } = ""; public int maincategoryid { get; set; } = 1; public int subcategoryid { get; set; } = 1; public int grade { get; set; } = 0; public string mail { get; set; } = ""; public string mailto { get; set; } = ""; public int onjob { get; set; } = 0; public int permission { get; set; } = 0; } }