2018-12-08 00:37:18 +00:00
|
|
|
import { Utils } from '../utils/utils';
|
|
|
|
|
|
|
|
class RepoInfo {
|
|
|
|
constructor(object) {
|
|
|
|
this.repo_id = object.repo_id;
|
|
|
|
this.repo_name = object.repo_name;
|
|
|
|
this.permission = object.permission;
|
|
|
|
this.size = Utils.bytesToSize(object.size);
|
2018-12-18 09:21:01 +00:00
|
|
|
this.file_count = object.file_count;
|
2018-12-08 00:37:18 +00:00
|
|
|
this.owner_name = object.owner_name;
|
|
|
|
this.owner_email = object.owner_email;
|
2018-12-18 09:21:01 +00:00
|
|
|
this.owner_contact_email = object.owner_contact_email;
|
2019-02-27 05:53:36 +00:00
|
|
|
// is repo shared admin;
|
|
|
|
// is repo shared admin && is one of current ordinary group's admins;
|
|
|
|
// is one of current group owned group's admins;
|
2018-12-08 00:37:18 +00:00
|
|
|
this.is_admin = object.is_admin;
|
2018-12-18 09:21:01 +00:00
|
|
|
this.is_virtual = object.is_virtual;
|
|
|
|
this.no_quota = object.no_quota;
|
|
|
|
this.has_been_shared_out = object.has_been_shared_out;
|
2018-12-08 00:37:18 +00:00
|
|
|
this.encrypted = object.encrypted;
|
2019-02-27 05:53:36 +00:00
|
|
|
this.lib_need_decrypt = object.lib_need_decrypt;
|
2018-12-08 00:37:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default RepoInfo;
|