24 lines
571 B
TypeScript
24 lines
571 B
TypeScript
import * as plugins from '../plugins.js';
|
|
|
|
@plugins.smartdata.managed()
|
|
export class User extends plugins.smartdata.SmartDataDbDoc<
|
|
User,
|
|
plugins.servezoneInterfaces.data.IUser
|
|
> {
|
|
public static async findUserByUsernameAndPassword(usernameArg: string, passwordArg: string) {
|
|
return await User.getInstance({
|
|
data: {
|
|
username: usernameArg,
|
|
password: passwordArg,
|
|
},
|
|
});
|
|
}
|
|
|
|
// INSTANCE
|
|
@plugins.smartdata.unI()
|
|
public id: string;
|
|
|
|
@plugins.smartdata.svDb()
|
|
public data: plugins.servezoneInterfaces.data.IUser['data'];
|
|
}
|