mirror of https://github.com/doccano/doccano.git
pythonannotation-tooldatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learning
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.
22 lines
455 B
22 lines
455 B
export class UserItem {
|
|
constructor(
|
|
public id: number,
|
|
public username: string,
|
|
public is_superuser: boolean
|
|
) {}
|
|
|
|
static valueOf(
|
|
{ id, username, is_superuser }:
|
|
{ id: number, username: string, is_superuser: boolean }
|
|
): UserItem {
|
|
return new UserItem(id, username, is_superuser)
|
|
}
|
|
|
|
toObject(): Object {
|
|
return {
|
|
id: this.id,
|
|
username: this.username,
|
|
is_superuser: this.is_superuser
|
|
}
|
|
}
|
|
}
|