An alternative to UBB.threads
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.4 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FLocal.Common.dataobjects {
public class Board : SqlObject<Board> {
private class TableSpec : FLocal.Core.DB.ITableSpec {
public static readonly TableSpec instance = new TableSpec();
public string name { get { return "boards"; } }
public string idName { get { return "id"; } }
}
protected override FLocal.Core.DB.ITableSpec table { get { return TableSpec.instance; } }
private string _name;
public string name {
get {
this.LoadIfNotLoaded();
return this._name;
}
}
private string _description;
public string description {
get {
this.LoadIfNotLoaded();
return this._description;
}
}
private int _lastPostId;
public int lastPostId {
get {
this.LoadIfNotLoaded();
return this._lastPostId;
}
}
private int _categoryId;
public int categoryId {
get {
this.LoadIfNotLoaded();
return this._categoryId;
}
}
public Category category {
get {
return Category.LoadById(this.categoryId);
}
}
protected override void doFromHash(Dictionary<string, string> data) {
this._name = data["name"];
15 years ago
this._description = data["comment"];
this._lastPostId = int.Parse(data["lastPostId"]);
this._categoryId = int.Parse(data["categoryId"]);
}
}
}