2024-05-28 18:45:34 +02:00
|
|
|
import * as plugins from '../plugins.js';
|
|
|
|
|
|
|
|
@plugins.smartdata.managed()
|
2024-06-01 05:48:57 +02:00
|
|
|
export class User extends plugins.smartdata.SmartDataDbDoc<
|
|
|
|
User,
|
|
|
|
plugins.servezoneInterfaces.data.IUser
|
|
|
|
> {
|
2024-05-30 22:49:39 +02:00
|
|
|
public static async findUserByUsernameAndPassword(usernameArg: string, passwordArg: string) {
|
|
|
|
return await User.getInstance({
|
|
|
|
data: {
|
|
|
|
username: usernameArg,
|
|
|
|
password: passwordArg,
|
2024-06-01 05:48:57 +02:00
|
|
|
},
|
2024-05-30 22:49:39 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// INSTANCE
|
|
|
|
@plugins.smartdata.unI()
|
|
|
|
public id: string;
|
|
|
|
|
|
|
|
@plugins.smartdata.svDb()
|
2024-08-25 14:29:26 +02:00
|
|
|
public data: plugins.servezoneInterfaces.data.IUser['data'];
|
2024-06-01 05:48:57 +02:00
|
|
|
}
|