mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-06 14:40:28 -04:00
Removed NioTSO client and server
- NioTSO client isn't needed because we're using RayLib - Added FreeSO's API server to handle most backend operations
This commit is contained in:
parent
f12ba1502b
commit
22191ce648
591 changed files with 53264 additions and 3362 deletions
35
server/FSO.Server.Database/DA/LotAdmit/SqlLotAdmit.cs
Executable file
35
server/FSO.Server.Database/DA/LotAdmit/SqlLotAdmit.cs
Executable file
|
@ -0,0 +1,35 @@
|
|||
using Dapper;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace FSO.Server.Database.DA.LotAdmit
|
||||
{
|
||||
public class SqlLotAdmit : AbstractSqlDA, ILotAdmit
|
||||
{
|
||||
public SqlLotAdmit(ISqlContext context) : base(context)
|
||||
{
|
||||
}
|
||||
|
||||
public void Create(DbLotAdmit bookmark)
|
||||
{
|
||||
Context.Connection.Execute("INSERT INTO fso_lot_admit (lot_id, avatar_id, admit_type) " +
|
||||
" VALUES (@lot_id, @avatar_id, @admit_type)"
|
||||
, bookmark);
|
||||
}
|
||||
|
||||
public bool Delete(DbLotAdmit bookmark)
|
||||
{
|
||||
return Context.Connection.Execute("DELETE FROM fso_lot_admit WHERE lot_id = @lot_id AND admit_type = @admit_type AND avatar_id = @avatar_id", bookmark) > 0;
|
||||
}
|
||||
|
||||
public List<DbLotAdmit> GetLotInfo(int lot_id)
|
||||
{
|
||||
return Context.Connection.Query<DbLotAdmit>("SELECT * FROM fso_lot_admit WHERE lot_id = @lot_id", new { lot_id = lot_id }).ToList();
|
||||
}
|
||||
|
||||
public List<uint> GetLotAdmitDeny(int lot_id, byte admit_type)
|
||||
{
|
||||
return Context.Connection.Query<uint>("SELECT avatar_id FROM fso_lot_admit WHERE lot_id = @lot_id AND admit_type = @admit_type", new { lot_id = lot_id, admit_type = admit_type }).ToList();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue