update
This commit is contained in:
parent
cdf3fad718
commit
f752287bed
@ -34,20 +34,12 @@ namespace Milimoe.FunGame.WebAPI
|
||||
|
||||
public override void AfterLoad(WebAPIPluginLoader loader, params object[] objs)
|
||||
{
|
||||
Configs.Load();
|
||||
Configs.Save();
|
||||
Statics.RunningPlugin ??= this;
|
||||
Statics.WebAPIPluginLoader ??= loader;
|
||||
Controller.NewSQLHelper();
|
||||
Controller.NewMailSender();
|
||||
if (objs.Length > 0 && objs[0] is WebApplicationBuilder builder)
|
||||
{
|
||||
builder.Services.AddTransient(provider =>
|
||||
{
|
||||
SQLHelper? sql = Factory.OpenFactory.GetSQLHelper();
|
||||
if (sql != null) return sql;
|
||||
throw new SQLServiceException();
|
||||
});
|
||||
builder.Services.AddTransient<JsonTool>();
|
||||
}
|
||||
WebAPIAuthenticator.WebAPICustomBearerTokenAuthenticator += CustomBearerTokenAuthenticator;
|
||||
}
|
||||
|
||||
|
||||
14
MilimoeWebAPI/Scripts/saints.sql
Normal file
14
MilimoeWebAPI/Scripts/saints.sql
Normal file
@ -0,0 +1,14 @@
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
DROP TABLE IF EXISTS `saints`;
|
||||
CREATE TABLE `saints` (
|
||||
`UID` bigint NOT NULL DEFAULT '0',
|
||||
`Group` bigint NOT NULL DEFAULT '0',
|
||||
`Year` int NOT NULL DEFAULT '0',
|
||||
`Month` int NOT NULL DEFAULT '0',
|
||||
`Times` int DEFAULT '0',
|
||||
`SC` double(20,2) DEFAULT '0.00',
|
||||
`Remark` varchar(255) DEFAULT '',
|
||||
`Record` varchar(1000) CHARACTER SET utf8mb4 DEFAULT '',
|
||||
PRIMARY KEY (`UID`,`Group`,`Year`,`Month`)
|
||||
);
|
||||
Loading…
x
Reference in New Issue
Block a user