namespace Song.Entities {
using System;
///
/// 表名:Teacher_Course 主键列:Thc_ID
///
[SerializableAttribute()]
public partial class Teacher_Course : WeiSha.Data.Entity {
protected Int32 _Thc_ID;
protected Int32 _Th_ID;
protected Int32 _Cou_ID;
public Int32 Thc_ID {
get {
return this._Thc_ID;
}
set {
this.OnPropertyValueChange(_.Thc_ID, _Thc_ID, value);
this._Thc_ID = value;
}
}
public Int32 Th_ID {
get {
return this._Th_ID;
}
set {
this.OnPropertyValueChange(_.Th_ID, _Th_ID, value);
this._Th_ID = value;
}
}
public Int32 Cou_ID {
get {
return this._Cou_ID;
}
set {
this.OnPropertyValueChange(_.Cou_ID, _Cou_ID, value);
this._Cou_ID = value;
}
}
///
/// 获取实体对应的表名
///
protected override WeiSha.Data.Table GetTable() {
return new WeiSha.Data.Table("Teacher_Course");
}
///
/// 获取实体中的标识列
///
protected override WeiSha.Data.Field GetIdentityField() {
return _.Thc_ID;
}
///
/// 获取实体中的主键列
///
protected override WeiSha.Data.Field[] GetPrimaryKeyFields() {
return new WeiSha.Data.Field[] {
_.Thc_ID};
}
///
/// 获取列信息
///
protected override WeiSha.Data.Field[] GetFields() {
return new WeiSha.Data.Field[] {
_.Thc_ID,
_.Th_ID,
_.Cou_ID};
}
///
/// 获取列数据
///
protected override object[] GetValues() {
return new object[] {
this._Thc_ID,
this._Th_ID,
this._Cou_ID};
}
///
/// 给当前实体赋值
///
protected override void SetValues(WeiSha.Data.IRowReader reader) {
if ((false == reader.IsDBNull(_.Thc_ID))) {
this._Thc_ID = reader.GetInt32(_.Thc_ID);
}
if ((false == reader.IsDBNull(_.Th_ID))) {
this._Th_ID = reader.GetInt32(_.Th_ID);
}
if ((false == reader.IsDBNull(_.Cou_ID))) {
this._Cou_ID = reader.GetInt32(_.Cou_ID);
}
}
public override int GetHashCode() {
return base.GetHashCode();
}
public override bool Equals(object obj) {
if ((obj == null)) {
return false;
}
if ((false == typeof(Teacher_Course).IsAssignableFrom(obj.GetType()))) {
return false;
}
if ((((object)(this)) == ((object)(obj)))) {
return true;
}
return false;
}
public class _ {
///
/// 表示选择所有列,与*等同
///
public static WeiSha.Data.AllField All = new WeiSha.Data.AllField();
///
/// 字段名:Thc_ID - 数据类型:Int32
///
public static WeiSha.Data.Field Thc_ID = new WeiSha.Data.Field("Thc_ID");
///
/// 字段名:Th_ID - 数据类型:Int32
///
public static WeiSha.Data.Field Th_ID = new WeiSha.Data.Field("Th_ID");
///
/// 字段名:Cou_ID - 数据类型:Int32
///
public static WeiSha.Data.Field Cou_ID = new WeiSha.Data.Field("Cou_ID");
}
}
}