2018-12-27 10:24:34 +08:00
|
|
|
class SharedRepoInfo {
|
2020-11-02 13:56:35 +08:00
|
|
|
|
2018-12-27 10:24:34 +08:00
|
|
|
constructor(object) {
|
|
|
|
this.repo_id = object.repo_id;
|
|
|
|
this.repo_name = object.repo_name;
|
|
|
|
this.share_type = object.share_type;
|
|
|
|
this.share_permission = object.share_permission;
|
2023-08-17 23:19:19 +08:00
|
|
|
this.share_permission_name = object.share_permission_name;
|
2018-12-27 10:24:34 +08:00
|
|
|
this.modifier_name = object.modifier_name;
|
|
|
|
this.modifier_email = object.modifier_email;
|
|
|
|
this.modifier_contact_email = object.modifier_contact_email;
|
|
|
|
this.encrypted = object.encrypted;
|
|
|
|
if (this.share_type === 'personal') {
|
|
|
|
this.is_admin = object.is_admin;
|
|
|
|
this.user_name = object.user_name;
|
|
|
|
this.user_email = object.user_email;
|
2019-08-14 15:10:58 +08:00
|
|
|
this.contact_email = object.contact_email;
|
|
|
|
} else if (this.share_type === 'group') {
|
2018-12-27 10:24:34 +08:00
|
|
|
this.is_admin = object.is_admin;
|
|
|
|
this.group_id = object.group_id;
|
|
|
|
this.group_name = object.group_name;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
export default SharedRepoInfo;
|