forked from dk96/QuotationMaker
293 lines
9.4 KiB
C#
293 lines
9.4 KiB
C#
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;
|
|
using Org.BouncyCastle.Bcpg.OpenPgp;
|
|
|
|
public class DbTableClass
|
|
{
|
|
[Table("modelSubItem")]
|
|
public class modelSubItem
|
|
{
|
|
[JsonIgnore]
|
|
[Key]
|
|
public int modelSubItem_sn { get; set; }
|
|
public string modelSubItem_uid { get; set; } = "";
|
|
public string modelMainItem_uid { get; set; } = "";
|
|
public string subItem_uid { get; set; } = "";
|
|
public string modelSubItem_name { get; set; } = "";
|
|
public string modelSubItem_descript { get; set; } = "";
|
|
public double modelSubItem_price { get; set; } = 0.0;
|
|
public string modelSubItem_unitType { get; set; } = "";
|
|
public double modelSubItem_number { get; set; } = 0.0;
|
|
public double modelSubItem_subTotal { get; set; } = 0.0;
|
|
public string modelSubItem_hasAC { get; set; } = "N";
|
|
public DateTime modelSubItem_createdate { get; set; } = DateTime.Now;
|
|
public DateTime modelSubItem_modifydate { get; set; } = DateTime.Now;
|
|
public string modelSubItem_lastModify_uid { get; set; } = "";
|
|
}
|
|
|
|
|
|
|
|
[Table("modelMainItem")]
|
|
public class modelMainItem
|
|
{
|
|
[JsonIgnore]
|
|
[Key]
|
|
public int modelMainItem_sn { get; set; }
|
|
public string modelMainItem_uid { get; set; } = "";
|
|
public string modelQuotation_uid { get; set; } = "";
|
|
public string mainItem_uid { get; set; } = "";
|
|
public string modelMainItem_name { get; set; } = "";
|
|
public double modelMainItem_ac { get; set; } = 0.0;
|
|
public double modelMainItem_subTotal { get; set; } = 0.0;
|
|
public DateTime modelMainItem_createdate { get; set; } = DateTime.Now;
|
|
public DateTime modelMainItem_modifydate { get; set; } = DateTime.Now;
|
|
public string modelMainItem_lastModify_uid { get; set; } = "";
|
|
}
|
|
|
|
[Table("modelQuotation")]
|
|
public class modelQuotation
|
|
{
|
|
[JsonIgnore]
|
|
[Key]
|
|
public int modelQuotation_sn { get; set; }
|
|
public string modelQuotation_uid { get; set; } = "";
|
|
public string dept_uid { get; set; } = "";
|
|
public string modelProj_uid { get; set; } = "";
|
|
public string modelQuotation_name { get; set; } = "";
|
|
public string company_uid { get; set; } = "";
|
|
public string contactPerson_uid { get; set; } = "";
|
|
public DateTime modelQuotation_createdate { get; set; } = DateTime.Now;
|
|
public DateTime modelQuotation_modifydate { get; set; } = DateTime.Now;
|
|
public string modelQuotation_lastmodify_uid { get; set; } = "";
|
|
}
|
|
|
|
|
|
|
|
[Table("modelProj")]
|
|
public class modelProj
|
|
{
|
|
[JsonIgnore]
|
|
[Key]
|
|
public int modelProj_sn { get; set; }
|
|
public string dept_uid { get; set; } = "";
|
|
public string modelProj_uid { get; set; } = "";
|
|
public string modelProj_name { get; set; } = "";
|
|
public DateTime modelProj_createdate { get; set; } = DateTime.Now;
|
|
public DateTime modelProj_modifydate { get; set; } = DateTime.Now;
|
|
public string modelProj_lastmodify_uid { get; set; } = "";
|
|
public string modelProj_isdel { get; set; } = "";
|
|
}
|
|
|
|
[Table("contactPerson")]
|
|
public class contactPerson
|
|
{
|
|
[JsonIgnore]
|
|
[Key]
|
|
public int contactPerson_sn { get; set; }
|
|
public string company_uid { get; set; } = "";
|
|
public string contactPerson_uid { get; set; } = "";
|
|
public string contactPerson_name { get; set; } = "";
|
|
public string contactPerson_email { get; set; } = "";
|
|
public string contactPerson_tel { get; set; } = "";
|
|
|
|
public string contactPerson_fax { get; set; } = "";
|
|
public string contactPerson_isdel { get; set; } = "N";
|
|
public DateTime contactPerson_createdate { get; set; } = DateTime.Now;
|
|
public DateTime contactPerson_modifydate { get; set; } = DateTime.Now;
|
|
public string contactPerson_lastmodify_uid { get; set; } = "";
|
|
}
|
|
|
|
|
|
|
|
[Table("company")]
|
|
public class company
|
|
{
|
|
[JsonIgnore]
|
|
[Key]
|
|
public int company_sn { get; set; }
|
|
public string company_uid { get; set; } = "";
|
|
public string company_name { get; set; } = "";
|
|
public string company_serialNo { get; set; } = "";
|
|
public string company_address { get; set; } = "";
|
|
public string company_tel { get; set; } = "";
|
|
public string company_fax { get; set; } = "";
|
|
public string company_isdel { get; set; } = "N";
|
|
public DateTime company_createdate { get; set; } = DateTime.Now;
|
|
public DateTime company_modifydate { get; set; } = DateTime.Now;
|
|
public string company_lastmodify_uid { get; set; } = "";
|
|
}
|
|
|
|
|
|
[Table("subItem")]
|
|
public class subItem
|
|
{
|
|
[JsonIgnore]
|
|
[Key]
|
|
public int subItem_sn { get; set; }
|
|
public string subItem_uid { get; set; } = "";
|
|
public string mainItem_uid { get; set; } = "";
|
|
public string subItem_name { get; set; } = "";
|
|
public string subItem_descript { get; set; } = "";
|
|
public double subItem_price { get; set; } = 0.0;
|
|
public string subItem_unitType { get; set; } = "";
|
|
public DateTime subItem_createdate { get; set; } = DateTime.Now;
|
|
public DateTime subItem_modifydate { get; set; } = DateTime.Now;
|
|
public string subItem_lastmodify_uid { get; set; } = "";
|
|
}
|
|
|
|
[Table("mainItem")]
|
|
public class mainItem
|
|
{
|
|
[JsonIgnore]
|
|
[Key]
|
|
public int mainItem_sn { get; set; }
|
|
public string mainItem_uid { get; set; } = "";
|
|
public string dept_uid { get; set; } = "";
|
|
public string mainItem_name { get; set; } = "";
|
|
public DateTime mainItem_createdate { get; set; } = DateTime.Now;
|
|
public DateTime mainItem_modifydate { get; set; } = DateTime.Now;
|
|
public string mainItem_lastmodify_uid { get; set; } = "";
|
|
}
|
|
|
|
[Table("userDept")]
|
|
public class userDept
|
|
{
|
|
[JsonIgnore]
|
|
[Key]
|
|
public int userDept_sn { get; set; }
|
|
public string user_uid { get; set; } = "";
|
|
public string dept_uid { get; set; } = "";
|
|
public DateTime userDept_createdate { get; set; } = DateTime.Now;
|
|
}
|
|
|
|
[Table("depts")]
|
|
public class depts
|
|
{
|
|
[JsonIgnore]
|
|
[Key]
|
|
public int dept_sn { get; set; }
|
|
public string dept_name { get; set; } = "";
|
|
public string dept_uid { get; set; } = "";
|
|
public string dept_code { get; set; } = "";
|
|
public int dept_order { get; set; } = 0;
|
|
public DateTime dept_createdate { get; set; } = DateTime.Now;
|
|
}
|
|
|
|
[Table("groupUser")]
|
|
public class groupUser
|
|
{
|
|
[JsonIgnore]
|
|
[Key]
|
|
public int groupUser_sn { get; set; }
|
|
public string groupUser_uid { get; set; } = "";
|
|
public string group_uid { get; set; } = "";
|
|
public string user_uid { get; set; } = "";
|
|
public string dept_uid { get; set; } = "";
|
|
public DateTime groupUser_createdate { get; set; } = DateTime.Now;
|
|
}
|
|
|
|
[Table("[group]")]
|
|
public class group
|
|
{
|
|
[JsonIgnore]
|
|
[Key]
|
|
public int group_sn { get; set; }
|
|
|
|
public string dept_uid { get; set; } = "";
|
|
public string group_uid { get; set; } = "";
|
|
public string group_name { get; set; } = "";
|
|
|
|
public DateTime group_createdate { 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;
|
|
|
|
}
|
|
|
|
}
|