2018-10-13 09:07:54 +00:00
|
|
|
import { Utils } from '../utils/utils';
|
|
|
|
|
|
|
|
class Repo {
|
|
|
|
constructor(object) {
|
|
|
|
this.repo_id = object.repo_id;
|
2018-10-25 05:36:06 +00:00
|
|
|
this.repo_name = object.repo_name;
|
2018-10-13 09:07:54 +00:00
|
|
|
this.permission = object.permission;
|
2019-05-30 08:01:18 +00:00
|
|
|
this.size_original = object.size;
|
2018-10-13 09:07:54 +00:00
|
|
|
this.size = Utils.bytesToSize(object.size);
|
|
|
|
this.owner_name = object.owner_name;
|
|
|
|
this.owner_email = object.owner_email;
|
|
|
|
this.owner_contact_email = object.owner_contact_email;
|
|
|
|
this.encrypted = object.encrypted;
|
2018-12-18 09:21:01 +00:00
|
|
|
this.last_modified = object.last_modified;
|
|
|
|
this.modifier_contact_email = object.modifier_contact_email;
|
|
|
|
this.modifier_email = object.modifier_email;
|
|
|
|
this.modifier_name = object.modifier_name;
|
2019-01-13 13:11:13 +00:00
|
|
|
this.type = object.type;
|
2019-02-26 06:14:00 +00:00
|
|
|
this.starred = object.starred;
|
2019-05-17 08:30:56 +00:00
|
|
|
this.status = object.status;
|
2019-08-08 05:08:13 +00:00
|
|
|
this.storage_name = object.storage_name;
|
2019-01-29 02:06:26 +00:00
|
|
|
if (object.is_admin != undefined) {
|
|
|
|
this.is_admin = object.is_admin;
|
|
|
|
}
|
2018-10-13 09:07:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Repo;
|