zoukankan      html  css  js  c++  java
  • EFDB 基本规范&知识

      

      public abstract class AccountRole //这是继承类型
        {
            [Key]
            public int ID { get; set; }
            public bool isDisabled { get; set; }
            public string email { get; set; }
            public string remark { get; set; }
            public string firstName { get; set; }
            public string lastName { get; set; }
            public string taskss { get; set; }
    
            [ForeignKey("account")]
            public int Accounts_id { get; set; }
            public virtual Account account { get; set; }
    
            [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
            public DateTimeOffset rowCreatedDT { get; set; }
            [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
            [ConcurrencyCheck]
            public byte[] rowVersion { get; set; }
            [ForeignKey("rowCreator")]
            public int? rowCreatorLoginAccounts_ID { get; set; }
            [ForeignKey("rowLastModifiedBy")]
            public int? rowLastModifiedByLoginAccounts_ID { get; set; }
    
            public virtual LoginAccount rowCreator { get; set; }
            public virtual LoginAccount rowLastModifiedBy { get; set; }
        }public class MemberRole : AccountRole //memberROle 继承 accountROle
        {
            public MemberRole()
            {
                businessResultComplex = new BusinessResultComplex { };
                monthlyTaskComplex = new MonthlyTaskComplex { };
            }
            public string investorOrIB { get; set; }
            public string MT4ID { get; set; }
            public string fullName { get; set; }
            public DateTime dateOfBirth { get; set; }
            public string alternativeEmail { get; set; }
            public string contactNumber { get; set; }
            public string gender { get; set; } 
            public BeneficiaryComplex beneficiaryComplex { get; set; } //complex 类型
            public AddressComplex addressComplex { get; set; }
            public BankComplex bankComplex { get; set; }
            public BusinessResultComplex businessResultComplex { get; set; }
            public MonthlyTaskComplex monthlyTaskComplex { get; set; }
            public DateTimeOffset lastLoginDT { get; set; }  //dateTime原始类型
            public DateTime TTDate { get; set; } //date原始类型
                    
            [ForeignKey("currentLevel")]
            public int Levels_ID { get; set; }
               
            public MemberMLMRelationTree MLMRelationTree { get; set; } 
            public BankBalance bankBalance { get; set; }
            public Level currentLevel { get; set; }
    
            public List<HistoryLogin> historyLogins { get; set; }
            public List<HistoryBankTransaction> historyBankTransactions { get; set; }         
            public List<HistoryLevel> historyLevels { get; set; }
            public List<Withdrawal> withdrawals { get; set; } 
            public List<MemberContract> contracts { get; set; }
        }
      public class HistoryLogin : RowInfo
        {
            [Key]
            public int ID { get; set; }
    
            [ForeignKey("member")]
            public int Members_ID { get; set; }
    
            public MemberRole member { get; set; }
        }

    EFDB是sql的结构, 大家都是类型(class), 但是有些时候会有大量重复, 所以会有继承(abstract)

    原始类型有 string, int, datetime, date

    在类型里可以有其他类型, 如果类型是complex就是一种集合(规范) , list(这是多对多或一对多的关系) , enum

  • 相关阅读:
    Fragment+ViewPager实现仿微信点击和滑动切换界面
    Android:控件WebView显示网页
    Android:控件WebView显示网页
    蓝桥杯 算法训练 数字三角形
    蓝桥杯 算法训练 数字三角形
    [置顶] Netty学习总结(1)——Netty入门介绍
    Git学习总结(7)——Git GUI学习教程
    Linux学习总结(12)——Linux必须学会的60个命令
    程序猿学习资料集
    Spring学习总结(14)——Spring10种常见异常解决方法
  • 原文地址:https://www.cnblogs.com/stooges/p/5023756.html
Copyright © 2011-2022 走看看