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"?"正常":"关账";
}
}
}
}