示例#1
0
 public TableItUser(Alias alias) : base(schema : "dbo", name : "ItUser", alias : alias)
 {
     this.UserId     = this.CreateInt32Column("UserId", ColumnMeta.PrimaryKey().Identity());
     this.ExternalId = this.CreateGuidColumn("ExternalId", null);
     this.FirstName  = this.CreateStringColumn(name: "FirstName", size: 255, isUnicode: false, isText: false, columnMeta: null);
     this.LastName   = this.CreateStringColumn(name: "LastName", size: 255, isUnicode: false, isText: false, columnMeta: null);
     this.Email      = this.CreateStringColumn(name: "Email", size: 255, isUnicode: false, isText: false, columnMeta: null);
     this.RegDate    = this.CreateDateTimeColumn("RegDate", false, null);
     this.Version    = this.CreateInt32Column("Version", ColumnMeta.DefaultValue(0));
     this.Created    = this.CreateDateTimeColumn("Created", false, ColumnMeta.DefaultValue(SqQueryBuilder.GetUtcDate()));
     this.Modified   = this.CreateDateTimeColumn("Modified", false, ColumnMeta.DefaultValue(SqQueryBuilder.GetUtcDate()));
     this.AddUniqueClusteredIndex(this.ExternalId);
     this.AddIndex(this.FirstName);
     this.AddIndex(IndexMetaColumn.Desc(this.LastName));
 }
示例#2
0
 public TableItOrder(Alias alias) : base(schema : "dbo", name : "ItOrder", alias : alias)
 {
     this.OrderId     = this.CreateInt32Column("OrderId", ColumnMeta.PrimaryKey().Identity());
     this.CustomerId  = this.CreateInt32Column("CustomerId", ColumnMeta.ForeignKey <TableItCustomer>(t => t.CustomerId));
     this.DateCreated = this.CreateDateTimeColumn("DateCreated", false, ColumnMeta.DefaultValue(SqQueryBuilder.GetUtcDate()));
     this.Notes       = this.CreateNullableStringColumn(name: "Notes", size: 100, isUnicode: true, isText: false, columnMeta: null);
 }
示例#3
0
        public TableCompany(Alias alias) : base("dbo", "Company", alias)
        {
            this.CompanyId   = this.CreateInt32Column(nameof(this.CompanyId), ColumnMeta.PrimaryKey().Identity());
            this.CompanyName = this.CreateStringColumn(nameof(this.CompanyName), 250);

            this.Version = this.CreateInt32Column("Version",
                                                  ColumnMeta.DefaultValue(0));
            this.ModifiedAt = this.CreateDateTimeColumn("ModifiedAt",
                                                        columnMeta: ColumnMeta.DefaultValue(SqQueryBuilder.GetUtcDate()));
        }
示例#4
0
        public TableUser(Alias alias) : base("dbo", "User", alias)
        {
            this.UserId    = this.CreateInt32Column("UserId", ColumnMeta.PrimaryKey().Identity());
            this.FirstName = this.CreateStringColumn("FirstName", size: 255, isUnicode: true);
            this.LastName  = this.CreateStringColumn("LastName", size: 255, isUnicode: true);

            this.Version = this.CreateInt32Column("Version",
                                                  ColumnMeta.DefaultValue(0));
            this.ModifiedAt = this.CreateDateTimeColumn("ModifiedAt",
                                                        columnMeta: ColumnMeta.DefaultValue(SqQueryBuilder.GetUtcDate()));
        }