using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
namespace zhengcaioa.Models
{
[Table("t_sim_bind")]
public class SimBind
{
[Key]
public int id { get; set; }
///
/// 卡号
///
public string sim_id { get; set; }
///
/// 用户
///
public string user_id { get; set; }
///
/// 属性
///
public string cardpro { get; set; }
public DateTime up_time { get; set; }
public string up_user { get; set; }
}
[Table("v_sim_bind")]
public class SimBindView
{
[Key]
public string Id { get; set; }
public string simcard { get; set; }
public string simstatus { get; set; }
public string userid { get; set; }
public string username { get; set; }
public string cardpro { get; set; }
[NotMapped]
public string cardproChs { get; set; }
public DateTime? up_time { get; set; }
}
[Table("t_sim_cost")]
public class SimCost
{
[Key]
public int id { get; set; }
public string user_id { get; set; }
public string sim_id { get; set; }
public int bill_year { get; set; }
public int bill_month { get; set; }
///
/// 可报金额
///
public decimal allow_amount { get; set; }
///
/// 账单金额
///
public decimal bill_amount { get; set; }
///
/// 差异金额
///
public decimal amount { get; set; }
///
/// 记账日期
///
public DateTime accounted_time { get; set; }
///
/// 状态
///
public string status { get; set; }
public string sub_userid { get; set; }
public DateTime up_time { get; set; }
public string audit_userid { get; set; }
public DateTime? audit_time { get; set; }
}
[Table("v_sim_cost")]
public class SimCostView
{
[Key]
public int id { get; set; }
public string user_id { get; set; }
public string username { get; set; }
public string sim_id { get; set; }
public string simcard { get; set; }
public int bill_year { get; set; }
public int bill_month { get; set; }
///
/// 可报金额
///
public decimal allow_amount { get; set; }
///
/// 账单金额
///
public decimal bill_amount { get; set; }
public decimal amount { get; set; }
///
/// 记账日期
///
public DateTime accounted_time { get; set; }
///
/// 状态
///
public string status { get; set; }
public DateTime up_time { get; set; }
[NotMapped]
public string accountMonth {
get
{
return bill_year + "-" + bill_month.ToString().PadLeft(2,'0');
}
}
[NotMapped]
public string statusChs
{
get
{
return status=="0"?"未核准":"已核准";
}
}
}
[Table("v_sim_costyear")]
public class SimCostYearView
{
///
/// 卡号
///
[Key]
public string sim_id { get; set; }
///
/// 年
///
public int bill_year { get; set; }
///
/// 1月
///
public decimal Jan { get; set; }
///
/// 2月
///
public decimal Feb { get; set; }
///
/// 3月
///
public decimal Mar { get; set; }
///
/// 4月
///
public decimal Apr { get; set; }
///
/// 5月
///
public decimal May { get; set; }
///
/// 6月
///
public decimal Jun { get; set; }
///
/// 7月
///
public decimal Jul { get; set; }
///
/// 8月
///
public decimal Aug { get; set; }
///
/// 9月
///
public decimal Sept { get; set; }
///
/// 10月
///
public decimal Oct { get; set; }
///
/// 11月
///
public decimal Nov { get; set; }
///
/// 12月
///
public decimal Dece { get; set; }
///
/// 卡号
///
public string sim { get; set; }
///
/// 检查编辑月
///
[NotMapped]
public int month { get; set; }
}
}