rbac is added

This commit is contained in:
병준 박 2022-08-08 01:49:45 +00:00
parent ed64495059
commit ba32c0dd6d
11 changed files with 1621 additions and 274 deletions

View File

@ -51,11 +51,8 @@ export class AuthSignInComponent implements OnInit {
ngOnInit(): void { ngOnInit(): void {
// Create the form // Create the form
this.signInForm = this._formBuilder.group({ this.signInForm = this._formBuilder.group({
email: [ email: ['administrator', [Validators.required]],
'hughes.brian@company.com', password: ['beteran', Validators.required],
[Validators.required, Validators.email],
],
password: ['admin', Validators.required],
captchaSecurityCode: ['', Validators.required], captchaSecurityCode: ['', Validators.required],
}); });

View File

@ -1,15 +1,21 @@
// package: bet.beteran.member // package: bet.beteran.domain
// file: models/member/member_site.proto // file: models/domain/site.proto
import * as jspb from 'google-protobuf'; import * as jspb from 'google-protobuf';
export class MemberSite extends jspb.Message { export class Site extends jspb.Message {
getId(): string; getId(): string;
setId(value: string): void; setId(value: string): void;
getUrl(): string; getUrl(): string;
setUrl(value: string): void; setUrl(value: string): void;
getShow(): boolean;
setShow(value: boolean): void;
getCanUse(): boolean;
setCanUse(value: boolean): void;
getCreatedAt(): number; getCreatedAt(): number;
setCreatedAt(value: number): void; setCreatedAt(value: number): void;
@ -22,30 +28,29 @@ export class MemberSite extends jspb.Message {
setDeletedAt(value: number): void; setDeletedAt(value: number): void;
serializeBinary(): Uint8Array; serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): MemberSite.AsObject; toObject(includeInstance?: boolean): Site.AsObject;
static toObject( static toObject(includeInstance: boolean, msg: Site): Site.AsObject;
includeInstance: boolean,
msg: MemberSite
): MemberSite.AsObject;
static extensions: { [key: number]: jspb.ExtensionFieldInfo<jspb.Message> }; static extensions: { [key: number]: jspb.ExtensionFieldInfo<jspb.Message> };
static extensionsBinary: { static extensionsBinary: {
[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>; [key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>;
}; };
static serializeBinaryToWriter( static serializeBinaryToWriter(
message: MemberSite, message: Site,
writer: jspb.BinaryWriter writer: jspb.BinaryWriter
): void; ): void;
static deserializeBinary(bytes: Uint8Array): MemberSite; static deserializeBinary(bytes: Uint8Array): Site;
static deserializeBinaryFromReader( static deserializeBinaryFromReader(
message: MemberSite, message: Site,
reader: jspb.BinaryReader reader: jspb.BinaryReader
): MemberSite; ): Site;
} }
export namespace MemberSite { export namespace Site {
export type AsObject = { export type AsObject = {
id: string; id: string;
url: string; url: string;
show: boolean;
canUse: boolean;
createdAt: number; createdAt: number;
updatedAt: number; updatedAt: number;
deletedAt: number; deletedAt: number;

View File

@ -1,4 +1,4 @@
// source: models/member/member_site.proto // source: models/domain/site.proto
/** /**
* @fileoverview * @fileoverview
* @enhanceable * @enhanceable
@ -17,7 +17,7 @@ var global = function () {
return this || window || global || self || Function("return this")(); return this || window || global || self || Function("return this")();
}.call(null); }.call(null);
goog.exportSymbol("proto.bet.beteran.member.MemberSite", null, global); goog.exportSymbol("proto.bet.beteran.domain.Site", null, global);
/** /**
* Generated by JsPbCodeGenerator. * Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a * @param {Array=} opt_data Optional initial data array, typically from a
@ -28,17 +28,16 @@ goog.exportSymbol("proto.bet.beteran.member.MemberSite", null, global);
* @extends {jspb.Message} * @extends {jspb.Message}
* @constructor * @constructor
*/ */
proto.bet.beteran.member.MemberSite = function (opt_data) { proto.bet.beteran.domain.Site = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null); jspb.Message.initialize(this, opt_data, 0, -1, null, null);
}; };
goog.inherits(proto.bet.beteran.member.MemberSite, jspb.Message); goog.inherits(proto.bet.beteran.domain.Site, jspb.Message);
if (goog.DEBUG && !COMPILED) { if (goog.DEBUG && !COMPILED) {
/** /**
* @public * @public
* @override * @override
*/ */
proto.bet.beteran.member.MemberSite.displayName = proto.bet.beteran.domain.Site.displayName = "proto.bet.beteran.domain.Site";
"proto.bet.beteran.member.MemberSite";
} }
if (jspb.Message.GENERATE_TO_OBJECT) { if (jspb.Message.GENERATE_TO_OBJECT) {
@ -54,13 +53,10 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* http://goto/soy-param-migration * http://goto/soy-param-migration
* @return {!Object} * @return {!Object}
*/ */
proto.bet.beteran.member.MemberSite.prototype.toObject = function ( proto.bet.beteran.domain.Site.prototype.toObject = function (
opt_includeInstance opt_includeInstance
) { ) {
return proto.bet.beteran.member.MemberSite.toObject( return proto.bet.beteran.domain.Site.toObject(opt_includeInstance, this);
opt_includeInstance,
this
);
}; };
/** /**
@ -68,21 +64,20 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
* @param {boolean|undefined} includeInstance Deprecated. Whether to include * @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support: * the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration * http://goto/soy-param-migration
* @param {!proto.bet.beteran.member.MemberSite} msg The msg instance to transform. * @param {!proto.bet.beteran.domain.Site} msg The msg instance to transform.
* @return {!Object} * @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages * @suppress {unusedLocalVariables} f is only used for nested messages
*/ */
proto.bet.beteran.member.MemberSite.toObject = function ( proto.bet.beteran.domain.Site.toObject = function (includeInstance, msg) {
includeInstance,
msg
) {
var f, var f,
obj = { obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""), id: jspb.Message.getFieldWithDefault(msg, 1, ""),
url: jspb.Message.getFieldWithDefault(msg, 2, ""), url: jspb.Message.getFieldWithDefault(msg, 2, ""),
createdAt: jspb.Message.getFieldWithDefault(msg, 3, 0), show: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
updatedAt: jspb.Message.getFieldWithDefault(msg, 4, 0), canUse: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
deletedAt: jspb.Message.getFieldWithDefault(msg, 5, 0), createdAt: jspb.Message.getFieldWithDefault(msg, 5, 0),
updatedAt: jspb.Message.getFieldWithDefault(msg, 6, 0),
deletedAt: jspb.Message.getFieldWithDefault(msg, 7, 0),
}; };
if (includeInstance) { if (includeInstance) {
@ -95,25 +90,22 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
/** /**
* Deserializes binary data (in protobuf wire format). * Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize. * @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bet.beteran.member.MemberSite} * @return {!proto.bet.beteran.domain.Site}
*/ */
proto.bet.beteran.member.MemberSite.deserializeBinary = function (bytes) { proto.bet.beteran.domain.Site.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes); var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bet.beteran.member.MemberSite(); var msg = new proto.bet.beteran.domain.Site();
return proto.bet.beteran.member.MemberSite.deserializeBinaryFromReader( return proto.bet.beteran.domain.Site.deserializeBinaryFromReader(msg, reader);
msg,
reader
);
}; };
/** /**
* Deserializes binary data (in protobuf wire format) from the * Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object. * given reader into the given message object.
* @param {!proto.bet.beteran.member.MemberSite} msg The message object to deserialize into. * @param {!proto.bet.beteran.domain.Site} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use. * @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bet.beteran.member.MemberSite} * @return {!proto.bet.beteran.domain.Site}
*/ */
proto.bet.beteran.member.MemberSite.deserializeBinaryFromReader = function ( proto.bet.beteran.domain.Site.deserializeBinaryFromReader = function (
msg, msg,
reader reader
) { ) {
@ -132,14 +124,22 @@ proto.bet.beteran.member.MemberSite.deserializeBinaryFromReader = function (
msg.setUrl(value); msg.setUrl(value);
break; break;
case 3: case 3:
var value = /** @type {boolean} */ (reader.readBool());
msg.setShow(value);
break;
case 4:
var value = /** @type {boolean} */ (reader.readBool());
msg.setCanUse(value);
break;
case 5:
var value = /** @type {number} */ (reader.readUint64()); var value = /** @type {number} */ (reader.readUint64());
msg.setCreatedAt(value); msg.setCreatedAt(value);
break; break;
case 4: case 6:
var value = /** @type {number} */ (reader.readUint64()); var value = /** @type {number} */ (reader.readUint64());
msg.setUpdatedAt(value); msg.setUpdatedAt(value);
break; break;
case 5: case 7:
var value = /** @type {number} */ (reader.readUint64()); var value = /** @type {number} */ (reader.readUint64());
msg.setDeletedAt(value); msg.setDeletedAt(value);
break; break;
@ -155,20 +155,20 @@ proto.bet.beteran.member.MemberSite.deserializeBinaryFromReader = function (
* Serializes the message to binary data (in protobuf wire format). * Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array} * @return {!Uint8Array}
*/ */
proto.bet.beteran.member.MemberSite.prototype.serializeBinary = function () { proto.bet.beteran.domain.Site.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter(); var writer = new jspb.BinaryWriter();
proto.bet.beteran.member.MemberSite.serializeBinaryToWriter(this, writer); proto.bet.beteran.domain.Site.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer(); return writer.getResultBuffer();
}; };
/** /**
* Serializes the given message to binary data (in protobuf wire * Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter. * format), writing to the given BinaryWriter.
* @param {!proto.bet.beteran.member.MemberSite} message * @param {!proto.bet.beteran.domain.Site} message
* @param {!jspb.BinaryWriter} writer * @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages * @suppress {unusedLocalVariables} f is only used for nested messages
*/ */
proto.bet.beteran.member.MemberSite.serializeBinaryToWriter = function ( proto.bet.beteran.domain.Site.serializeBinaryToWriter = function (
message, message,
writer writer
) { ) {
@ -181,17 +181,25 @@ proto.bet.beteran.member.MemberSite.serializeBinaryToWriter = function (
if (f.length > 0) { if (f.length > 0) {
writer.writeString(2, f); writer.writeString(2, f);
} }
f = message.getShow();
if (f) {
writer.writeBool(3, f);
}
f = message.getCanUse();
if (f) {
writer.writeBool(4, f);
}
f = message.getCreatedAt(); f = message.getCreatedAt();
if (f !== 0) { if (f !== 0) {
writer.writeUint64(3, f); writer.writeUint64(5, f);
} }
f = message.getUpdatedAt(); f = message.getUpdatedAt();
if (f !== 0) { if (f !== 0) {
writer.writeUint64(4, f); writer.writeUint64(6, f);
} }
f = /** @type {number} */ (jspb.Message.getField(message, 5)); f = /** @type {number} */ (jspb.Message.getField(message, 7));
if (f != null) { if (f != null) {
writer.writeUint64(5, f); writer.writeUint64(7, f);
} }
}; };
@ -199,15 +207,15 @@ proto.bet.beteran.member.MemberSite.serializeBinaryToWriter = function (
* optional string id = 1; * optional string id = 1;
* @return {string} * @return {string}
*/ */
proto.bet.beteran.member.MemberSite.prototype.getId = function () { proto.bet.beteran.domain.Site.prototype.getId = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
}; };
/** /**
* @param {string} value * @param {string} value
* @return {!proto.bet.beteran.member.MemberSite} returns this * @return {!proto.bet.beteran.domain.Site} returns this
*/ */
proto.bet.beteran.member.MemberSite.prototype.setId = function (value) { proto.bet.beteran.domain.Site.prototype.setId = function (value) {
return jspb.Message.setProto3StringField(this, 1, value); return jspb.Message.setProto3StringField(this, 1, value);
}; };
@ -215,80 +223,116 @@ proto.bet.beteran.member.MemberSite.prototype.setId = function (value) {
* optional string url = 2; * optional string url = 2;
* @return {string} * @return {string}
*/ */
proto.bet.beteran.member.MemberSite.prototype.getUrl = function () { proto.bet.beteran.domain.Site.prototype.getUrl = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
}; };
/** /**
* @param {string} value * @param {string} value
* @return {!proto.bet.beteran.member.MemberSite} returns this * @return {!proto.bet.beteran.domain.Site} returns this
*/ */
proto.bet.beteran.member.MemberSite.prototype.setUrl = function (value) { proto.bet.beteran.domain.Site.prototype.setUrl = function (value) {
return jspb.Message.setProto3StringField(this, 2, value); return jspb.Message.setProto3StringField(this, 2, value);
}; };
/** /**
* optional uint64 created_at = 3; * optional bool show = 3;
* @return {boolean}
*/
proto.bet.beteran.domain.Site.prototype.getShow = function () {
return /** @type {boolean} */ (
jspb.Message.getBooleanFieldWithDefault(this, 3, false)
);
};
/**
* @param {boolean} value
* @return {!proto.bet.beteran.domain.Site} returns this
*/
proto.bet.beteran.domain.Site.prototype.setShow = function (value) {
return jspb.Message.setProto3BooleanField(this, 3, value);
};
/**
* optional bool can_use = 4;
* @return {boolean}
*/
proto.bet.beteran.domain.Site.prototype.getCanUse = function () {
return /** @type {boolean} */ (
jspb.Message.getBooleanFieldWithDefault(this, 4, false)
);
};
/**
* @param {boolean} value
* @return {!proto.bet.beteran.domain.Site} returns this
*/
proto.bet.beteran.domain.Site.prototype.setCanUse = function (value) {
return jspb.Message.setProto3BooleanField(this, 4, value);
};
/**
* optional uint64 created_at = 5;
* @return {number} * @return {number}
*/ */
proto.bet.beteran.member.MemberSite.prototype.getCreatedAt = function () { proto.bet.beteran.domain.Site.prototype.getCreatedAt = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.bet.beteran.member.MemberSite} returns this
*/
proto.bet.beteran.member.MemberSite.prototype.setCreatedAt = function (value) {
return jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional uint64 updated_at = 4;
* @return {number}
*/
proto.bet.beteran.member.MemberSite.prototype.getUpdatedAt = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {number} value
* @return {!proto.bet.beteran.member.MemberSite} returns this
*/
proto.bet.beteran.member.MemberSite.prototype.setUpdatedAt = function (value) {
return jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional uint64 deleted_at = 5;
* @return {number}
*/
proto.bet.beteran.member.MemberSite.prototype.getDeletedAt = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
}; };
/** /**
* @param {number} value * @param {number} value
* @return {!proto.bet.beteran.member.MemberSite} returns this * @return {!proto.bet.beteran.domain.Site} returns this
*/ */
proto.bet.beteran.member.MemberSite.prototype.setDeletedAt = function (value) { proto.bet.beteran.domain.Site.prototype.setCreatedAt = function (value) {
return jspb.Message.setField(this, 5, value); return jspb.Message.setProto3IntField(this, 5, value);
};
/**
* optional uint64 updated_at = 6;
* @return {number}
*/
proto.bet.beteran.domain.Site.prototype.getUpdatedAt = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/**
* @param {number} value
* @return {!proto.bet.beteran.domain.Site} returns this
*/
proto.bet.beteran.domain.Site.prototype.setUpdatedAt = function (value) {
return jspb.Message.setProto3IntField(this, 6, value);
};
/**
* optional uint64 deleted_at = 7;
* @return {number}
*/
proto.bet.beteran.domain.Site.prototype.getDeletedAt = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/**
* @param {number} value
* @return {!proto.bet.beteran.domain.Site} returns this
*/
proto.bet.beteran.domain.Site.prototype.setDeletedAt = function (value) {
return jspb.Message.setField(this, 7, value);
}; };
/** /**
* Clears the field making it undefined. * Clears the field making it undefined.
* @return {!proto.bet.beteran.member.MemberSite} returns this * @return {!proto.bet.beteran.domain.Site} returns this
*/ */
proto.bet.beteran.member.MemberSite.prototype.clearDeletedAt = function () { proto.bet.beteran.domain.Site.prototype.clearDeletedAt = function () {
return jspb.Message.setField(this, 5, undefined); return jspb.Message.setField(this, 7, undefined);
}; };
/** /**
* Returns whether this field is set. * Returns whether this field is set.
* @return {boolean} * @return {boolean}
*/ */
proto.bet.beteran.member.MemberSite.prototype.hasDeletedAt = function () { proto.bet.beteran.domain.Site.prototype.hasDeletedAt = function () {
return jspb.Message.getField(this, 5) != null; return jspb.Message.getField(this, 7) != null;
}; };
goog.object.extend(exports, proto.bet.beteran.member); goog.object.extend(exports, proto.bet.beteran.domain);

View File

@ -2,16 +2,18 @@
// file: models/member/member.proto // file: models/member/member.proto
import * as jspb from 'google-protobuf'; import * as jspb from 'google-protobuf';
import * as models_domain_site_pb from '../../models/domain/site_pb';
import * as models_member_member_class_pb from '../../models/member/member_class_pb'; import * as models_member_member_class_pb from '../../models/member/member_class_pb';
import * as models_member_member_level_pb from '../../models/member/member_level_pb'; import * as models_member_member_level_pb from '../../models/member/member_level_pb';
import * as models_member_member_site_pb from '../../models/member/member_site_pb';
export class Member extends jspb.Message { export class Member extends jspb.Message {
getId(): string; getId(): string;
setId(value: string): void; setId(value: string): void;
getDomainId(): string; hasSite(): boolean;
setDomainId(value: string): void; clearSite(): void;
getSite(): models_domain_site_pb.Site | undefined;
setSite(value?: models_domain_site_pb.Site): void;
hasMemberClass(): boolean; hasMemberClass(): boolean;
clearMemberClass(): void; clearMemberClass(): void;
@ -23,11 +25,6 @@ export class Member extends jspb.Message {
getMemberLevel(): models_member_member_level_pb.MemberLevel | undefined; getMemberLevel(): models_member_member_level_pb.MemberLevel | undefined;
setMemberLevel(value?: models_member_member_level_pb.MemberLevel): void; setMemberLevel(value?: models_member_member_level_pb.MemberLevel): void;
hasMemberSite(): boolean;
clearMemberSite(): void;
getMemberSite(): models_member_member_site_pb.MemberSite | undefined;
setMemberSite(value?: models_member_member_site_pb.MemberSite): void;
hasReferrer(): boolean; hasReferrer(): boolean;
clearReferrer(): void; clearReferrer(): void;
getReferrer(): Member | undefined; getReferrer(): Member | undefined;
@ -97,10 +94,9 @@ export class Member extends jspb.Message {
export namespace Member { export namespace Member {
export type AsObject = { export type AsObject = {
id: string; id: string;
domainId: string; site?: models_domain_site_pb.Site.AsObject;
memberClass?: models_member_member_class_pb.MemberClass.AsObject; memberClass?: models_member_member_class_pb.MemberClass.AsObject;
memberLevel?: models_member_member_level_pb.MemberLevel.AsObject; memberLevel?: models_member_member_level_pb.MemberLevel.AsObject;
memberSite?: models_member_member_site_pb.MemberSite.AsObject;
referrer?: Member.AsObject; referrer?: Member.AsObject;
referredCount: number; referredCount: number;
username: string; username: string;

View File

@ -17,12 +17,12 @@ var global = function () {
return this || window || global || self || Function("return this")(); return this || window || global || self || Function("return this")();
}.call(null); }.call(null);
var models_domain_site_pb = require("../../models/domain/site_pb.js");
goog.object.extend(proto, models_domain_site_pb);
var models_member_member_class_pb = require("../../models/member/member_class_pb.js"); var models_member_member_class_pb = require("../../models/member/member_class_pb.js");
goog.object.extend(proto, models_member_member_class_pb); goog.object.extend(proto, models_member_member_class_pb);
var models_member_member_level_pb = require("../../models/member/member_level_pb.js"); var models_member_member_level_pb = require("../../models/member/member_level_pb.js");
goog.object.extend(proto, models_member_member_level_pb); goog.object.extend(proto, models_member_member_level_pb);
var models_member_member_site_pb = require("../../models/member/member_site_pb.js");
goog.object.extend(proto, models_member_member_site_pb);
goog.exportSymbol("proto.bet.beteran.member.Member", null, global); goog.exportSymbol("proto.bet.beteran.member.Member", null, global);
goog.exportSymbol("proto.bet.beteran.member.MemberState", null, global); goog.exportSymbol("proto.bet.beteran.member.MemberState", null, global);
/** /**
@ -80,7 +80,9 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
var f, var f,
obj = { obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""), id: jspb.Message.getFieldWithDefault(msg, 1, ""),
domainId: jspb.Message.getFieldWithDefault(msg, 2, ""), site:
(f = msg.getSite()) &&
models_domain_site_pb.Site.toObject(includeInstance, f),
memberClass: memberClass:
(f = msg.getMemberClass()) && (f = msg.getMemberClass()) &&
models_member_member_class_pb.MemberClass.toObject( models_member_member_class_pb.MemberClass.toObject(
@ -93,23 +95,20 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
includeInstance, includeInstance,
f f
), ),
memberSite:
(f = msg.getMemberSite()) &&
models_member_member_site_pb.MemberSite.toObject(includeInstance, f),
referrer: referrer:
(f = msg.getReferrer()) && (f = msg.getReferrer()) &&
proto.bet.beteran.member.Member.toObject(includeInstance, f), proto.bet.beteran.member.Member.toObject(includeInstance, f),
referredCount: jspb.Message.getFieldWithDefault(msg, 7, 0), referredCount: jspb.Message.getFieldWithDefault(msg, 6, 0),
username: jspb.Message.getFieldWithDefault(msg, 8, ""), username: jspb.Message.getFieldWithDefault(msg, 7, ""),
nickname: jspb.Message.getFieldWithDefault(msg, 9, ""), nickname: jspb.Message.getFieldWithDefault(msg, 8, ""),
mobilePhoneNumber: jspb.Message.getFieldWithDefault(msg, 10, ""), mobilePhoneNumber: jspb.Message.getFieldWithDefault(msg, 9, ""),
state: jspb.Message.getFieldWithDefault(msg, 11, 0), state: jspb.Message.getFieldWithDefault(msg, 10, 0),
stateChangedAt: jspb.Message.getFieldWithDefault(msg, 12, 0), stateChangedAt: jspb.Message.getFieldWithDefault(msg, 11, 0),
lastSigninedIp: jspb.Message.getFieldWithDefault(msg, 13, ""), lastSigninedIp: jspb.Message.getFieldWithDefault(msg, 12, ""),
lastSigninedAt: jspb.Message.getFieldWithDefault(msg, 14, 0), lastSigninedAt: jspb.Message.getFieldWithDefault(msg, 13, 0),
createdAt: jspb.Message.getFieldWithDefault(msg, 15, 0), createdAt: jspb.Message.getFieldWithDefault(msg, 14, 0),
updatedAt: jspb.Message.getFieldWithDefault(msg, 16, 0), updatedAt: jspb.Message.getFieldWithDefault(msg, 15, 0),
deletedAt: jspb.Message.getFieldWithDefault(msg, 17, 0), deletedAt: jspb.Message.getFieldWithDefault(msg, 16, 0),
}; };
if (includeInstance) { if (includeInstance) {
@ -155,8 +154,12 @@ proto.bet.beteran.member.Member.deserializeBinaryFromReader = function (
msg.setId(value); msg.setId(value);
break; break;
case 2: case 2:
var value = /** @type {string} */ (reader.readString()); var value = new models_domain_site_pb.Site();
msg.setDomainId(value); reader.readMessage(
value,
models_domain_site_pb.Site.deserializeBinaryFromReader
);
msg.setSite(value);
break; break;
case 3: case 3:
var value = new models_member_member_class_pb.MemberClass(); var value = new models_member_member_class_pb.MemberClass();
@ -175,14 +178,6 @@ proto.bet.beteran.member.Member.deserializeBinaryFromReader = function (
msg.setMemberLevel(value); msg.setMemberLevel(value);
break; break;
case 5: case 5:
var value = new models_member_member_site_pb.MemberSite();
reader.readMessage(
value,
models_member_member_site_pb.MemberSite.deserializeBinaryFromReader
);
msg.setMemberSite(value);
break;
case 6:
var value = new proto.bet.beteran.member.Member(); var value = new proto.bet.beteran.member.Member();
reader.readMessage( reader.readMessage(
value, value,
@ -190,49 +185,49 @@ proto.bet.beteran.member.Member.deserializeBinaryFromReader = function (
); );
msg.setReferrer(value); msg.setReferrer(value);
break; break;
case 7: case 6:
var value = /** @type {number} */ (reader.readUint64()); var value = /** @type {number} */ (reader.readUint64());
msg.setReferredCount(value); msg.setReferredCount(value);
break; break;
case 8: case 7:
var value = /** @type {string} */ (reader.readString()); var value = /** @type {string} */ (reader.readString());
msg.setUsername(value); msg.setUsername(value);
break; break;
case 9: case 8:
var value = /** @type {string} */ (reader.readString()); var value = /** @type {string} */ (reader.readString());
msg.setNickname(value); msg.setNickname(value);
break; break;
case 10: case 9:
var value = /** @type {string} */ (reader.readString()); var value = /** @type {string} */ (reader.readString());
msg.setMobilePhoneNumber(value); msg.setMobilePhoneNumber(value);
break; break;
case 11: case 10:
var value = /** @type {!proto.bet.beteran.member.MemberState} */ ( var value = /** @type {!proto.bet.beteran.member.MemberState} */ (
reader.readEnum() reader.readEnum()
); );
msg.setState(value); msg.setState(value);
break; break;
case 12: case 11:
var value = /** @type {number} */ (reader.readUint64()); var value = /** @type {number} */ (reader.readUint64());
msg.setStateChangedAt(value); msg.setStateChangedAt(value);
break; break;
case 13: case 12:
var value = /** @type {string} */ (reader.readString()); var value = /** @type {string} */ (reader.readString());
msg.setLastSigninedIp(value); msg.setLastSigninedIp(value);
break; break;
case 14: case 13:
var value = /** @type {number} */ (reader.readUint64()); var value = /** @type {number} */ (reader.readUint64());
msg.setLastSigninedAt(value); msg.setLastSigninedAt(value);
break; break;
case 15: case 14:
var value = /** @type {number} */ (reader.readUint64()); var value = /** @type {number} */ (reader.readUint64());
msg.setCreatedAt(value); msg.setCreatedAt(value);
break; break;
case 16: case 15:
var value = /** @type {number} */ (reader.readUint64()); var value = /** @type {number} */ (reader.readUint64());
msg.setUpdatedAt(value); msg.setUpdatedAt(value);
break; break;
case 17: case 16:
var value = /** @type {number} */ (reader.readUint64()); var value = /** @type {number} */ (reader.readUint64());
msg.setDeletedAt(value); msg.setDeletedAt(value);
break; break;
@ -270,9 +265,13 @@ proto.bet.beteran.member.Member.serializeBinaryToWriter = function (
if (f.length > 0) { if (f.length > 0) {
writer.writeString(1, f); writer.writeString(1, f);
} }
f = message.getDomainId(); f = message.getSite();
if (f.length > 0) { if (f != null) {
writer.writeString(2, f); writer.writeMessage(
2,
f,
models_domain_site_pb.Site.serializeBinaryToWriter
);
} }
f = message.getMemberClass(); f = message.getMemberClass();
if (f != null) { if (f != null) {
@ -290,65 +289,57 @@ proto.bet.beteran.member.Member.serializeBinaryToWriter = function (
models_member_member_level_pb.MemberLevel.serializeBinaryToWriter models_member_member_level_pb.MemberLevel.serializeBinaryToWriter
); );
} }
f = message.getMemberSite();
if (f != null) {
writer.writeMessage(
5,
f,
models_member_member_site_pb.MemberSite.serializeBinaryToWriter
);
}
f = message.getReferrer(); f = message.getReferrer();
if (f != null) { if (f != null) {
writer.writeMessage( writer.writeMessage(
6, 5,
f, f,
proto.bet.beteran.member.Member.serializeBinaryToWriter proto.bet.beteran.member.Member.serializeBinaryToWriter
); );
} }
f = message.getReferredCount(); f = message.getReferredCount();
if (f !== 0) { if (f !== 0) {
writer.writeUint64(7, f); writer.writeUint64(6, f);
} }
f = message.getUsername(); f = message.getUsername();
if (f.length > 0) { if (f.length > 0) {
writer.writeString(8, f); writer.writeString(7, f);
} }
f = message.getNickname(); f = message.getNickname();
if (f.length > 0) { if (f.length > 0) {
writer.writeString(9, f); writer.writeString(8, f);
} }
f = /** @type {string} */ (jspb.Message.getField(message, 10)); f = /** @type {string} */ (jspb.Message.getField(message, 9));
if (f != null) { if (f != null) {
writer.writeString(10, f); writer.writeString(9, f);
} }
f = message.getState(); f = message.getState();
if (f !== 0.0) { if (f !== 0.0) {
writer.writeEnum(11, f); writer.writeEnum(10, f);
} }
f = /** @type {number} */ (jspb.Message.getField(message, 12)); f = /** @type {number} */ (jspb.Message.getField(message, 11));
if (f != null) { if (f != null) {
writer.writeUint64(12, f); writer.writeUint64(11, f);
} }
f = /** @type {string} */ (jspb.Message.getField(message, 13)); f = /** @type {string} */ (jspb.Message.getField(message, 12));
if (f != null) { if (f != null) {
writer.writeString(13, f); writer.writeString(12, f);
} }
f = /** @type {number} */ (jspb.Message.getField(message, 14)); f = /** @type {number} */ (jspb.Message.getField(message, 13));
if (f != null) { if (f != null) {
writer.writeUint64(14, f); writer.writeUint64(13, f);
} }
f = message.getCreatedAt(); f = message.getCreatedAt();
if (f !== 0) { if (f !== 0) {
writer.writeUint64(15, f); writer.writeUint64(14, f);
} }
f = message.getUpdatedAt(); f = message.getUpdatedAt();
if (f !== 0) { if (f !== 0) {
writer.writeUint64(16, f); writer.writeUint64(15, f);
} }
f = /** @type {number} */ (jspb.Message.getField(message, 17)); f = /** @type {number} */ (jspb.Message.getField(message, 16));
if (f != null) { if (f != null) {
writer.writeUint64(17, f); writer.writeUint64(16, f);
} }
}; };
@ -369,19 +360,37 @@ proto.bet.beteran.member.Member.prototype.setId = function (value) {
}; };
/** /**
* optional string domain_id = 2; * optional bet.beteran.domain.Site site = 2;
* @return {string} * @return {?proto.bet.beteran.domain.Site}
*/ */
proto.bet.beteran.member.Member.prototype.getDomainId = function () { proto.bet.beteran.member.Member.prototype.getSite = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); return /** @type{?proto.bet.beteran.domain.Site} */ (
jspb.Message.getWrapperField(this, models_domain_site_pb.Site, 2)
);
}; };
/** /**
* @param {string} value * @param {?proto.bet.beteran.domain.Site|undefined} value
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.setDomainId = function (value) { proto.bet.beteran.member.Member.prototype.setSite = function (value) {
return jspb.Message.setProto3StringField(this, 2, value); return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bet.beteran.member.Member} returns this
*/
proto.bet.beteran.member.Member.prototype.clearSite = function () {
return this.setSite(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.member.Member.prototype.hasSite = function () {
return jspb.Message.getField(this, 2) != null;
}; };
/** /**
@ -461,50 +470,12 @@ proto.bet.beteran.member.Member.prototype.hasMemberLevel = function () {
}; };
/** /**
* optional MemberSite member_site = 5; * optional Member referrer = 5;
* @return {?proto.bet.beteran.member.MemberSite}
*/
proto.bet.beteran.member.Member.prototype.getMemberSite = function () {
return /** @type{?proto.bet.beteran.member.MemberSite} */ (
jspb.Message.getWrapperField(
this,
models_member_member_site_pb.MemberSite,
5
)
);
};
/**
* @param {?proto.bet.beteran.member.MemberSite|undefined} value
* @return {!proto.bet.beteran.member.Member} returns this
*/
proto.bet.beteran.member.Member.prototype.setMemberSite = function (value) {
return jspb.Message.setWrapperField(this, 5, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bet.beteran.member.Member} returns this
*/
proto.bet.beteran.member.Member.prototype.clearMemberSite = function () {
return this.setMemberSite(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.member.Member.prototype.hasMemberSite = function () {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional Member referrer = 6;
* @return {?proto.bet.beteran.member.Member} * @return {?proto.bet.beteran.member.Member}
*/ */
proto.bet.beteran.member.Member.prototype.getReferrer = function () { proto.bet.beteran.member.Member.prototype.getReferrer = function () {
return /** @type{?proto.bet.beteran.member.Member} */ ( return /** @type{?proto.bet.beteran.member.Member} */ (
jspb.Message.getWrapperField(this, proto.bet.beteran.member.Member, 6) jspb.Message.getWrapperField(this, proto.bet.beteran.member.Member, 5)
); );
}; };
@ -513,7 +484,7 @@ proto.bet.beteran.member.Member.prototype.getReferrer = function () {
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.setReferrer = function (value) { proto.bet.beteran.member.Member.prototype.setReferrer = function (value) {
return jspb.Message.setWrapperField(this, 6, value); return jspb.Message.setWrapperField(this, 5, value);
}; };
/** /**
@ -529,15 +500,15 @@ proto.bet.beteran.member.Member.prototype.clearReferrer = function () {
* @return {boolean} * @return {boolean}
*/ */
proto.bet.beteran.member.Member.prototype.hasReferrer = function () { proto.bet.beteran.member.Member.prototype.hasReferrer = function () {
return jspb.Message.getField(this, 6) != null; return jspb.Message.getField(this, 5) != null;
}; };
/** /**
* optional uint64 referred_count = 7; * optional uint64 referred_count = 6;
* @return {number} * @return {number}
*/ */
proto.bet.beteran.member.Member.prototype.getReferredCount = function () { proto.bet.beteran.member.Member.prototype.getReferredCount = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
}; };
/** /**
@ -545,15 +516,15 @@ proto.bet.beteran.member.Member.prototype.getReferredCount = function () {
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.setReferredCount = function (value) { proto.bet.beteran.member.Member.prototype.setReferredCount = function (value) {
return jspb.Message.setProto3IntField(this, 7, value); return jspb.Message.setProto3IntField(this, 6, value);
}; };
/** /**
* optional string username = 8; * optional string username = 7;
* @return {string} * @return {string}
*/ */
proto.bet.beteran.member.Member.prototype.getUsername = function () { proto.bet.beteran.member.Member.prototype.getUsername = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
}; };
/** /**
@ -561,15 +532,15 @@ proto.bet.beteran.member.Member.prototype.getUsername = function () {
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.setUsername = function (value) { proto.bet.beteran.member.Member.prototype.setUsername = function (value) {
return jspb.Message.setProto3StringField(this, 8, value); return jspb.Message.setProto3StringField(this, 7, value);
}; };
/** /**
* optional string nickname = 9; * optional string nickname = 8;
* @return {string} * @return {string}
*/ */
proto.bet.beteran.member.Member.prototype.getNickname = function () { proto.bet.beteran.member.Member.prototype.getNickname = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
}; };
/** /**
@ -577,15 +548,15 @@ proto.bet.beteran.member.Member.prototype.getNickname = function () {
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.setNickname = function (value) { proto.bet.beteran.member.Member.prototype.setNickname = function (value) {
return jspb.Message.setProto3StringField(this, 9, value); return jspb.Message.setProto3StringField(this, 8, value);
}; };
/** /**
* optional string mobile_phone_number = 10; * optional string mobile_phone_number = 9;
* @return {string} * @return {string}
*/ */
proto.bet.beteran.member.Member.prototype.getMobilePhoneNumber = function () { proto.bet.beteran.member.Member.prototype.getMobilePhoneNumber = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
}; };
/** /**
@ -595,7 +566,7 @@ proto.bet.beteran.member.Member.prototype.getMobilePhoneNumber = function () {
proto.bet.beteran.member.Member.prototype.setMobilePhoneNumber = function ( proto.bet.beteran.member.Member.prototype.setMobilePhoneNumber = function (
value value
) { ) {
return jspb.Message.setField(this, 10, value); return jspb.Message.setField(this, 9, value);
}; };
/** /**
@ -603,7 +574,7 @@ proto.bet.beteran.member.Member.prototype.setMobilePhoneNumber = function (
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.clearMobilePhoneNumber = function () { proto.bet.beteran.member.Member.prototype.clearMobilePhoneNumber = function () {
return jspb.Message.setField(this, 10, undefined); return jspb.Message.setField(this, 9, undefined);
}; };
/** /**
@ -611,16 +582,16 @@ proto.bet.beteran.member.Member.prototype.clearMobilePhoneNumber = function () {
* @return {boolean} * @return {boolean}
*/ */
proto.bet.beteran.member.Member.prototype.hasMobilePhoneNumber = function () { proto.bet.beteran.member.Member.prototype.hasMobilePhoneNumber = function () {
return jspb.Message.getField(this, 10) != null; return jspb.Message.getField(this, 9) != null;
}; };
/** /**
* optional MemberState state = 11; * optional MemberState state = 10;
* @return {!proto.bet.beteran.member.MemberState} * @return {!proto.bet.beteran.member.MemberState}
*/ */
proto.bet.beteran.member.Member.prototype.getState = function () { proto.bet.beteran.member.Member.prototype.getState = function () {
return /** @type {!proto.bet.beteran.member.MemberState} */ ( return /** @type {!proto.bet.beteran.member.MemberState} */ (
jspb.Message.getFieldWithDefault(this, 11, 0) jspb.Message.getFieldWithDefault(this, 10, 0)
); );
}; };
@ -629,15 +600,15 @@ proto.bet.beteran.member.Member.prototype.getState = function () {
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.setState = function (value) { proto.bet.beteran.member.Member.prototype.setState = function (value) {
return jspb.Message.setProto3EnumField(this, 11, value); return jspb.Message.setProto3EnumField(this, 10, value);
}; };
/** /**
* optional uint64 state_changed_at = 12; * optional uint64 state_changed_at = 11;
* @return {number} * @return {number}
*/ */
proto.bet.beteran.member.Member.prototype.getStateChangedAt = function () { proto.bet.beteran.member.Member.prototype.getStateChangedAt = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0));
}; };
/** /**
@ -645,7 +616,7 @@ proto.bet.beteran.member.Member.prototype.getStateChangedAt = function () {
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.setStateChangedAt = function (value) { proto.bet.beteran.member.Member.prototype.setStateChangedAt = function (value) {
return jspb.Message.setField(this, 12, value); return jspb.Message.setField(this, 11, value);
}; };
/** /**
@ -653,7 +624,7 @@ proto.bet.beteran.member.Member.prototype.setStateChangedAt = function (value) {
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.clearStateChangedAt = function () { proto.bet.beteran.member.Member.prototype.clearStateChangedAt = function () {
return jspb.Message.setField(this, 12, undefined); return jspb.Message.setField(this, 11, undefined);
}; };
/** /**
@ -661,15 +632,15 @@ proto.bet.beteran.member.Member.prototype.clearStateChangedAt = function () {
* @return {boolean} * @return {boolean}
*/ */
proto.bet.beteran.member.Member.prototype.hasStateChangedAt = function () { proto.bet.beteran.member.Member.prototype.hasStateChangedAt = function () {
return jspb.Message.getField(this, 12) != null; return jspb.Message.getField(this, 11) != null;
}; };
/** /**
* optional string last_signined_ip = 13; * optional string last_signined_ip = 12;
* @return {string} * @return {string}
*/ */
proto.bet.beteran.member.Member.prototype.getLastSigninedIp = function () { proto.bet.beteran.member.Member.prototype.getLastSigninedIp = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
}; };
/** /**
@ -677,7 +648,7 @@ proto.bet.beteran.member.Member.prototype.getLastSigninedIp = function () {
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.setLastSigninedIp = function (value) { proto.bet.beteran.member.Member.prototype.setLastSigninedIp = function (value) {
return jspb.Message.setField(this, 13, value); return jspb.Message.setField(this, 12, value);
}; };
/** /**
@ -685,7 +656,7 @@ proto.bet.beteran.member.Member.prototype.setLastSigninedIp = function (value) {
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.clearLastSigninedIp = function () { proto.bet.beteran.member.Member.prototype.clearLastSigninedIp = function () {
return jspb.Message.setField(this, 13, undefined); return jspb.Message.setField(this, 12, undefined);
}; };
/** /**
@ -693,15 +664,15 @@ proto.bet.beteran.member.Member.prototype.clearLastSigninedIp = function () {
* @return {boolean} * @return {boolean}
*/ */
proto.bet.beteran.member.Member.prototype.hasLastSigninedIp = function () { proto.bet.beteran.member.Member.prototype.hasLastSigninedIp = function () {
return jspb.Message.getField(this, 13) != null; return jspb.Message.getField(this, 12) != null;
}; };
/** /**
* optional uint64 last_signined_at = 14; * optional uint64 last_signined_at = 13;
* @return {number} * @return {number}
*/ */
proto.bet.beteran.member.Member.prototype.getLastSigninedAt = function () { proto.bet.beteran.member.Member.prototype.getLastSigninedAt = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0));
}; };
/** /**
@ -709,7 +680,7 @@ proto.bet.beteran.member.Member.prototype.getLastSigninedAt = function () {
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.setLastSigninedAt = function (value) { proto.bet.beteran.member.Member.prototype.setLastSigninedAt = function (value) {
return jspb.Message.setField(this, 14, value); return jspb.Message.setField(this, 13, value);
}; };
/** /**
@ -717,7 +688,7 @@ proto.bet.beteran.member.Member.prototype.setLastSigninedAt = function (value) {
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.clearLastSigninedAt = function () { proto.bet.beteran.member.Member.prototype.clearLastSigninedAt = function () {
return jspb.Message.setField(this, 14, undefined); return jspb.Message.setField(this, 13, undefined);
}; };
/** /**
@ -725,15 +696,15 @@ proto.bet.beteran.member.Member.prototype.clearLastSigninedAt = function () {
* @return {boolean} * @return {boolean}
*/ */
proto.bet.beteran.member.Member.prototype.hasLastSigninedAt = function () { proto.bet.beteran.member.Member.prototype.hasLastSigninedAt = function () {
return jspb.Message.getField(this, 14) != null; return jspb.Message.getField(this, 13) != null;
}; };
/** /**
* optional uint64 created_at = 15; * optional uint64 created_at = 14;
* @return {number} * @return {number}
*/ */
proto.bet.beteran.member.Member.prototype.getCreatedAt = function () { proto.bet.beteran.member.Member.prototype.getCreatedAt = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0));
}; };
/** /**
@ -741,15 +712,15 @@ proto.bet.beteran.member.Member.prototype.getCreatedAt = function () {
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.setCreatedAt = function (value) { proto.bet.beteran.member.Member.prototype.setCreatedAt = function (value) {
return jspb.Message.setProto3IntField(this, 15, value); return jspb.Message.setProto3IntField(this, 14, value);
}; };
/** /**
* optional uint64 updated_at = 16; * optional uint64 updated_at = 15;
* @return {number} * @return {number}
*/ */
proto.bet.beteran.member.Member.prototype.getUpdatedAt = function () { proto.bet.beteran.member.Member.prototype.getUpdatedAt = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0));
}; };
/** /**
@ -757,15 +728,15 @@ proto.bet.beteran.member.Member.prototype.getUpdatedAt = function () {
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.setUpdatedAt = function (value) { proto.bet.beteran.member.Member.prototype.setUpdatedAt = function (value) {
return jspb.Message.setProto3IntField(this, 16, value); return jspb.Message.setProto3IntField(this, 15, value);
}; };
/** /**
* optional uint64 deleted_at = 17; * optional uint64 deleted_at = 16;
* @return {number} * @return {number}
*/ */
proto.bet.beteran.member.Member.prototype.getDeletedAt = function () { proto.bet.beteran.member.Member.prototype.getDeletedAt = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0));
}; };
/** /**
@ -773,7 +744,7 @@ proto.bet.beteran.member.Member.prototype.getDeletedAt = function () {
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.setDeletedAt = function (value) { proto.bet.beteran.member.Member.prototype.setDeletedAt = function (value) {
return jspb.Message.setField(this, 17, value); return jspb.Message.setField(this, 16, value);
}; };
/** /**
@ -781,7 +752,7 @@ proto.bet.beteran.member.Member.prototype.setDeletedAt = function (value) {
* @return {!proto.bet.beteran.member.Member} returns this * @return {!proto.bet.beteran.member.Member} returns this
*/ */
proto.bet.beteran.member.Member.prototype.clearDeletedAt = function () { proto.bet.beteran.member.Member.prototype.clearDeletedAt = function () {
return jspb.Message.setField(this, 17, undefined); return jspb.Message.setField(this, 16, undefined);
}; };
/** /**
@ -789,7 +760,7 @@ proto.bet.beteran.member.Member.prototype.clearDeletedAt = function () {
* @return {boolean} * @return {boolean}
*/ */
proto.bet.beteran.member.Member.prototype.hasDeletedAt = function () { proto.bet.beteran.member.Member.prototype.hasDeletedAt = function () {
return jspb.Message.getField(this, 17) != null; return jspb.Message.getField(this, 16) != null;
}; };
/** /**

View File

@ -0,0 +1,66 @@
// package: bet.beteran.rbac
// file: models/rbac/resource_action.proto
import * as jspb from 'google-protobuf';
import * as models_rbac_resource_pb from '../../models/rbac/resource_pb';
export class ResourceAction extends jspb.Message {
getId(): string;
setId(value: string): void;
hasResource(): boolean;
clearResource(): void;
getResource(): models_rbac_resource_pb.Resource | undefined;
setResource(value?: models_rbac_resource_pb.Resource): void;
getName(): string;
setName(value: string): void;
getKey(): string;
setKey(value: string): void;
getDescription(): string;
setDescription(value: string): void;
getCanUse(): boolean;
setCanUse(value: boolean): void;
getCreatedAt(): number;
setCreatedAt(value: number): void;
getUpdatedAt(): number;
setUpdatedAt(value: number): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ResourceAction.AsObject;
static toObject(
includeInstance: boolean,
msg: ResourceAction
): ResourceAction.AsObject;
static extensions: { [key: number]: jspb.ExtensionFieldInfo<jspb.Message> };
static extensionsBinary: {
[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>;
};
static serializeBinaryToWriter(
message: ResourceAction,
writer: jspb.BinaryWriter
): void;
static deserializeBinary(bytes: Uint8Array): ResourceAction;
static deserializeBinaryFromReader(
message: ResourceAction,
reader: jspb.BinaryReader
): ResourceAction;
}
export namespace ResourceAction {
export type AsObject = {
id: string;
resource?: models_rbac_resource_pb.Resource.AsObject;
name: string;
key: string;
description: string;
canUse: boolean;
createdAt: number;
updatedAt: number;
};
}

View File

@ -0,0 +1,391 @@
// source: models/rbac/resource_action.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require("google-protobuf");
var goog = jspb;
var global = function () {
return this || window || global || self || Function("return this")();
}.call(null);
var models_rbac_resource_pb = require("../../models/rbac/resource_pb.js");
goog.object.extend(proto, models_rbac_resource_pb);
goog.exportSymbol("proto.bet.beteran.rbac.ResourceAction", null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.bet.beteran.rbac.ResourceAction = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bet.beteran.rbac.ResourceAction, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bet.beteran.rbac.ResourceAction.displayName =
"proto.bet.beteran.rbac.ResourceAction";
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bet.beteran.rbac.ResourceAction.prototype.toObject = function (
opt_includeInstance
) {
return proto.bet.beteran.rbac.ResourceAction.toObject(
opt_includeInstance,
this
);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.bet.beteran.rbac.ResourceAction} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.rbac.ResourceAction.toObject = function (
includeInstance,
msg
) {
var f,
obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
resource:
(f = msg.getResource()) &&
models_rbac_resource_pb.Resource.toObject(includeInstance, f),
name: jspb.Message.getFieldWithDefault(msg, 3, ""),
key: jspb.Message.getFieldWithDefault(msg, 4, ""),
description: jspb.Message.getFieldWithDefault(msg, 5, ""),
canUse: jspb.Message.getBooleanFieldWithDefault(msg, 6, false),
createdAt: jspb.Message.getFieldWithDefault(msg, 7, 0),
updatedAt: jspb.Message.getFieldWithDefault(msg, 8, 0),
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bet.beteran.rbac.ResourceAction}
*/
proto.bet.beteran.rbac.ResourceAction.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bet.beteran.rbac.ResourceAction();
return proto.bet.beteran.rbac.ResourceAction.deserializeBinaryFromReader(
msg,
reader
);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bet.beteran.rbac.ResourceAction} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bet.beteran.rbac.ResourceAction}
*/
proto.bet.beteran.rbac.ResourceAction.deserializeBinaryFromReader = function (
msg,
reader
) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = new models_rbac_resource_pb.Resource();
reader.readMessage(
value,
models_rbac_resource_pb.Resource.deserializeBinaryFromReader
);
msg.setResource(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setKey(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
case 6:
var value = /** @type {boolean} */ (reader.readBool());
msg.setCanUse(value);
break;
case 7:
var value = /** @type {number} */ (reader.readUint64());
msg.setCreatedAt(value);
break;
case 8:
var value = /** @type {number} */ (reader.readUint64());
msg.setUpdatedAt(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bet.beteran.rbac.ResourceAction.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.bet.beteran.rbac.ResourceAction.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bet.beteran.rbac.ResourceAction} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.rbac.ResourceAction.serializeBinaryToWriter = function (
message,
writer
) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getResource();
if (f != null) {
writer.writeMessage(
2,
f,
models_rbac_resource_pb.Resource.serializeBinaryToWriter
);
}
f = message.getName();
if (f.length > 0) {
writer.writeString(3, f);
}
f = message.getKey();
if (f.length > 0) {
writer.writeString(4, f);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(5, f);
}
f = message.getCanUse();
if (f) {
writer.writeBool(6, f);
}
f = message.getCreatedAt();
if (f !== 0) {
writer.writeUint64(7, f);
}
f = message.getUpdatedAt();
if (f !== 0) {
writer.writeUint64(8, f);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.bet.beteran.rbac.ResourceAction.prototype.getId = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bet.beteran.rbac.ResourceAction} returns this
*/
proto.bet.beteran.rbac.ResourceAction.prototype.setId = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional Resource resource = 2;
* @return {?proto.bet.beteran.rbac.Resource}
*/
proto.bet.beteran.rbac.ResourceAction.prototype.getResource = function () {
return /** @type{?proto.bet.beteran.rbac.Resource} */ (
jspb.Message.getWrapperField(this, models_rbac_resource_pb.Resource, 2)
);
};
/**
* @param {?proto.bet.beteran.rbac.Resource|undefined} value
* @return {!proto.bet.beteran.rbac.ResourceAction} returns this
*/
proto.bet.beteran.rbac.ResourceAction.prototype.setResource = function (value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bet.beteran.rbac.ResourceAction} returns this
*/
proto.bet.beteran.rbac.ResourceAction.prototype.clearResource = function () {
return this.setResource(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.rbac.ResourceAction.prototype.hasResource = function () {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional string name = 3;
* @return {string}
*/
proto.bet.beteran.rbac.ResourceAction.prototype.getName = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.bet.beteran.rbac.ResourceAction} returns this
*/
proto.bet.beteran.rbac.ResourceAction.prototype.setName = function (value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string key = 4;
* @return {string}
*/
proto.bet.beteran.rbac.ResourceAction.prototype.getKey = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.bet.beteran.rbac.ResourceAction} returns this
*/
proto.bet.beteran.rbac.ResourceAction.prototype.setKey = function (value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional string description = 5;
* @return {string}
*/
proto.bet.beteran.rbac.ResourceAction.prototype.getDescription = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.bet.beteran.rbac.ResourceAction} returns this
*/
proto.bet.beteran.rbac.ResourceAction.prototype.setDescription = function (
value
) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional bool can_use = 6;
* @return {boolean}
*/
proto.bet.beteran.rbac.ResourceAction.prototype.getCanUse = function () {
return /** @type {boolean} */ (
jspb.Message.getBooleanFieldWithDefault(this, 6, false)
);
};
/**
* @param {boolean} value
* @return {!proto.bet.beteran.rbac.ResourceAction} returns this
*/
proto.bet.beteran.rbac.ResourceAction.prototype.setCanUse = function (value) {
return jspb.Message.setProto3BooleanField(this, 6, value);
};
/**
* optional uint64 created_at = 7;
* @return {number}
*/
proto.bet.beteran.rbac.ResourceAction.prototype.getCreatedAt = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/**
* @param {number} value
* @return {!proto.bet.beteran.rbac.ResourceAction} returns this
*/
proto.bet.beteran.rbac.ResourceAction.prototype.setCreatedAt = function (
value
) {
return jspb.Message.setProto3IntField(this, 7, value);
};
/**
* optional uint64 updated_at = 8;
* @return {number}
*/
proto.bet.beteran.rbac.ResourceAction.prototype.getUpdatedAt = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
};
/**
* @param {number} value
* @return {!proto.bet.beteran.rbac.ResourceAction} returns this
*/
proto.bet.beteran.rbac.ResourceAction.prototype.setUpdatedAt = function (
value
) {
return jspb.Message.setProto3IntField(this, 8, value);
};
goog.object.extend(exports, proto.bet.beteran.rbac);

View File

@ -0,0 +1,62 @@
// package: bet.beteran.rbac
// file: models/rbac/resource.proto
import * as jspb from 'google-protobuf';
export class Resource extends jspb.Message {
getId(): string;
setId(value: string): void;
hasParent(): boolean;
clearParent(): void;
getParent(): Resource | undefined;
setParent(value?: Resource): void;
getName(): string;
setName(value: string): void;
getKey(): string;
setKey(value: string): void;
getDescription(): string;
setDescription(value: string): void;
getCanUse(): boolean;
setCanUse(value: boolean): void;
getCreatedAt(): number;
setCreatedAt(value: number): void;
getUpdatedAt(): number;
setUpdatedAt(value: number): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Resource.AsObject;
static toObject(includeInstance: boolean, msg: Resource): Resource.AsObject;
static extensions: { [key: number]: jspb.ExtensionFieldInfo<jspb.Message> };
static extensionsBinary: {
[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>;
};
static serializeBinaryToWriter(
message: Resource,
writer: jspb.BinaryWriter
): void;
static deserializeBinary(bytes: Uint8Array): Resource;
static deserializeBinaryFromReader(
message: Resource,
reader: jspb.BinaryReader
): Resource;
}
export namespace Resource {
export type AsObject = {
id: string;
parent?: Resource.AsObject;
name: string;
key: string;
description: string;
canUse: boolean;
createdAt: number;
updatedAt: number;
};
}

View File

@ -0,0 +1,377 @@
// source: models/rbac/resource.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require("google-protobuf");
var goog = jspb;
var global = function () {
return this || window || global || self || Function("return this")();
}.call(null);
goog.exportSymbol("proto.bet.beteran.rbac.Resource", null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.bet.beteran.rbac.Resource = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bet.beteran.rbac.Resource, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bet.beteran.rbac.Resource.displayName =
"proto.bet.beteran.rbac.Resource";
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bet.beteran.rbac.Resource.prototype.toObject = function (
opt_includeInstance
) {
return proto.bet.beteran.rbac.Resource.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.bet.beteran.rbac.Resource} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.rbac.Resource.toObject = function (includeInstance, msg) {
var f,
obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
parent:
(f = msg.getParent()) &&
proto.bet.beteran.rbac.Resource.toObject(includeInstance, f),
name: jspb.Message.getFieldWithDefault(msg, 3, ""),
key: jspb.Message.getFieldWithDefault(msg, 4, ""),
description: jspb.Message.getFieldWithDefault(msg, 5, ""),
canUse: jspb.Message.getBooleanFieldWithDefault(msg, 6, false),
createdAt: jspb.Message.getFieldWithDefault(msg, 7, 0),
updatedAt: jspb.Message.getFieldWithDefault(msg, 8, 0),
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bet.beteran.rbac.Resource}
*/
proto.bet.beteran.rbac.Resource.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bet.beteran.rbac.Resource();
return proto.bet.beteran.rbac.Resource.deserializeBinaryFromReader(
msg,
reader
);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bet.beteran.rbac.Resource} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bet.beteran.rbac.Resource}
*/
proto.bet.beteran.rbac.Resource.deserializeBinaryFromReader = function (
msg,
reader
) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = new proto.bet.beteran.rbac.Resource();
reader.readMessage(
value,
proto.bet.beteran.rbac.Resource.deserializeBinaryFromReader
);
msg.setParent(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setKey(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
case 6:
var value = /** @type {boolean} */ (reader.readBool());
msg.setCanUse(value);
break;
case 7:
var value = /** @type {number} */ (reader.readUint64());
msg.setCreatedAt(value);
break;
case 8:
var value = /** @type {number} */ (reader.readUint64());
msg.setUpdatedAt(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bet.beteran.rbac.Resource.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.bet.beteran.rbac.Resource.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bet.beteran.rbac.Resource} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.rbac.Resource.serializeBinaryToWriter = function (
message,
writer
) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getParent();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bet.beteran.rbac.Resource.serializeBinaryToWriter
);
}
f = message.getName();
if (f.length > 0) {
writer.writeString(3, f);
}
f = message.getKey();
if (f.length > 0) {
writer.writeString(4, f);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(5, f);
}
f = message.getCanUse();
if (f) {
writer.writeBool(6, f);
}
f = message.getCreatedAt();
if (f !== 0) {
writer.writeUint64(7, f);
}
f = message.getUpdatedAt();
if (f !== 0) {
writer.writeUint64(8, f);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.bet.beteran.rbac.Resource.prototype.getId = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bet.beteran.rbac.Resource} returns this
*/
proto.bet.beteran.rbac.Resource.prototype.setId = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional Resource parent = 2;
* @return {?proto.bet.beteran.rbac.Resource}
*/
proto.bet.beteran.rbac.Resource.prototype.getParent = function () {
return /** @type{?proto.bet.beteran.rbac.Resource} */ (
jspb.Message.getWrapperField(this, proto.bet.beteran.rbac.Resource, 2)
);
};
/**
* @param {?proto.bet.beteran.rbac.Resource|undefined} value
* @return {!proto.bet.beteran.rbac.Resource} returns this
*/
proto.bet.beteran.rbac.Resource.prototype.setParent = function (value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bet.beteran.rbac.Resource} returns this
*/
proto.bet.beteran.rbac.Resource.prototype.clearParent = function () {
return this.setParent(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.rbac.Resource.prototype.hasParent = function () {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional string name = 3;
* @return {string}
*/
proto.bet.beteran.rbac.Resource.prototype.getName = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.bet.beteran.rbac.Resource} returns this
*/
proto.bet.beteran.rbac.Resource.prototype.setName = function (value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string key = 4;
* @return {string}
*/
proto.bet.beteran.rbac.Resource.prototype.getKey = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.bet.beteran.rbac.Resource} returns this
*/
proto.bet.beteran.rbac.Resource.prototype.setKey = function (value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional string description = 5;
* @return {string}
*/
proto.bet.beteran.rbac.Resource.prototype.getDescription = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.bet.beteran.rbac.Resource} returns this
*/
proto.bet.beteran.rbac.Resource.prototype.setDescription = function (value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional bool can_use = 6;
* @return {boolean}
*/
proto.bet.beteran.rbac.Resource.prototype.getCanUse = function () {
return /** @type {boolean} */ (
jspb.Message.getBooleanFieldWithDefault(this, 6, false)
);
};
/**
* @param {boolean} value
* @return {!proto.bet.beteran.rbac.Resource} returns this
*/
proto.bet.beteran.rbac.Resource.prototype.setCanUse = function (value) {
return jspb.Message.setProto3BooleanField(this, 6, value);
};
/**
* optional uint64 created_at = 7;
* @return {number}
*/
proto.bet.beteran.rbac.Resource.prototype.getCreatedAt = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/**
* @param {number} value
* @return {!proto.bet.beteran.rbac.Resource} returns this
*/
proto.bet.beteran.rbac.Resource.prototype.setCreatedAt = function (value) {
return jspb.Message.setProto3IntField(this, 7, value);
};
/**
* optional uint64 updated_at = 8;
* @return {number}
*/
proto.bet.beteran.rbac.Resource.prototype.getUpdatedAt = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
};
/**
* @param {number} value
* @return {!proto.bet.beteran.rbac.Resource} returns this
*/
proto.bet.beteran.rbac.Resource.prototype.setUpdatedAt = function (value) {
return jspb.Message.setProto3IntField(this, 8, value);
};
goog.object.extend(exports, proto.bet.beteran.rbac);

View File

@ -0,0 +1,63 @@
// package: bet.beteran.rbac
// file: models/rbac/role.proto
import * as jspb from 'google-protobuf';
import * as models_rbac_resource_pb from '../../models/rbac/resource_pb';
export class Role extends jspb.Message {
getId(): string;
setId(value: string): void;
hasParent(): boolean;
clearParent(): void;
getParent(): Role | undefined;
setParent(value?: Role): void;
getName(): string;
setName(value: string): void;
getKey(): string;
setKey(value: string): void;
getDescription(): string;
setDescription(value: string): void;
getCanUse(): boolean;
setCanUse(value: boolean): void;
getCreatedAt(): number;
setCreatedAt(value: number): void;
getUpdatedAt(): number;
setUpdatedAt(value: number): void;
serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): Role.AsObject;
static toObject(includeInstance: boolean, msg: Role): Role.AsObject;
static extensions: { [key: number]: jspb.ExtensionFieldInfo<jspb.Message> };
static extensionsBinary: {
[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>;
};
static serializeBinaryToWriter(
message: Role,
writer: jspb.BinaryWriter
): void;
static deserializeBinary(bytes: Uint8Array): Role;
static deserializeBinaryFromReader(
message: Role,
reader: jspb.BinaryReader
): Role;
}
export namespace Role {
export type AsObject = {
id: string;
parent?: Role.AsObject;
name: string;
key: string;
description: string;
canUse: boolean;
createdAt: number;
updatedAt: number;
};
}

View File

@ -0,0 +1,375 @@
// source: models/rbac/role.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require("google-protobuf");
var goog = jspb;
var global = function () {
return this || window || global || self || Function("return this")();
}.call(null);
var models_rbac_resource_pb = require("../../models/rbac/resource_pb.js");
goog.object.extend(proto, models_rbac_resource_pb);
goog.exportSymbol("proto.bet.beteran.rbac.Role", null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.bet.beteran.rbac.Role = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bet.beteran.rbac.Role, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bet.beteran.rbac.Role.displayName = "proto.bet.beteran.rbac.Role";
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.bet.beteran.rbac.Role.prototype.toObject = function (
opt_includeInstance
) {
return proto.bet.beteran.rbac.Role.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.bet.beteran.rbac.Role} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.rbac.Role.toObject = function (includeInstance, msg) {
var f,
obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
parent:
(f = msg.getParent()) &&
proto.bet.beteran.rbac.Role.toObject(includeInstance, f),
name: jspb.Message.getFieldWithDefault(msg, 3, ""),
key: jspb.Message.getFieldWithDefault(msg, 4, ""),
description: jspb.Message.getFieldWithDefault(msg, 5, ""),
canUse: jspb.Message.getBooleanFieldWithDefault(msg, 6, false),
createdAt: jspb.Message.getFieldWithDefault(msg, 7, 0),
updatedAt: jspb.Message.getFieldWithDefault(msg, 8, 0),
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.bet.beteran.rbac.Role}
*/
proto.bet.beteran.rbac.Role.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bet.beteran.rbac.Role();
return proto.bet.beteran.rbac.Role.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bet.beteran.rbac.Role} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bet.beteran.rbac.Role}
*/
proto.bet.beteran.rbac.Role.deserializeBinaryFromReader = function (
msg,
reader
) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setId(value);
break;
case 2:
var value = new proto.bet.beteran.rbac.Role();
reader.readMessage(
value,
proto.bet.beteran.rbac.Role.deserializeBinaryFromReader
);
msg.setParent(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setName(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setKey(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
case 6:
var value = /** @type {boolean} */ (reader.readBool());
msg.setCanUse(value);
break;
case 7:
var value = /** @type {number} */ (reader.readUint64());
msg.setCreatedAt(value);
break;
case 8:
var value = /** @type {number} */ (reader.readUint64());
msg.setUpdatedAt(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bet.beteran.rbac.Role.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.bet.beteran.rbac.Role.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bet.beteran.rbac.Role} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.rbac.Role.serializeBinaryToWriter = function (
message,
writer
) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getParent();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bet.beteran.rbac.Role.serializeBinaryToWriter
);
}
f = message.getName();
if (f.length > 0) {
writer.writeString(3, f);
}
f = message.getKey();
if (f.length > 0) {
writer.writeString(4, f);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(5, f);
}
f = message.getCanUse();
if (f) {
writer.writeBool(6, f);
}
f = message.getCreatedAt();
if (f !== 0) {
writer.writeUint64(7, f);
}
f = message.getUpdatedAt();
if (f !== 0) {
writer.writeUint64(8, f);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.bet.beteran.rbac.Role.prototype.getId = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.bet.beteran.rbac.Role} returns this
*/
proto.bet.beteran.rbac.Role.prototype.setId = function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional Role parent = 2;
* @return {?proto.bet.beteran.rbac.Role}
*/
proto.bet.beteran.rbac.Role.prototype.getParent = function () {
return /** @type{?proto.bet.beteran.rbac.Role} */ (
jspb.Message.getWrapperField(this, proto.bet.beteran.rbac.Role, 2)
);
};
/**
* @param {?proto.bet.beteran.rbac.Role|undefined} value
* @return {!proto.bet.beteran.rbac.Role} returns this
*/
proto.bet.beteran.rbac.Role.prototype.setParent = function (value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bet.beteran.rbac.Role} returns this
*/
proto.bet.beteran.rbac.Role.prototype.clearParent = function () {
return this.setParent(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.rbac.Role.prototype.hasParent = function () {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional string name = 3;
* @return {string}
*/
proto.bet.beteran.rbac.Role.prototype.getName = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.bet.beteran.rbac.Role} returns this
*/
proto.bet.beteran.rbac.Role.prototype.setName = function (value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string key = 4;
* @return {string}
*/
proto.bet.beteran.rbac.Role.prototype.getKey = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.bet.beteran.rbac.Role} returns this
*/
proto.bet.beteran.rbac.Role.prototype.setKey = function (value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional string description = 5;
* @return {string}
*/
proto.bet.beteran.rbac.Role.prototype.getDescription = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/**
* @param {string} value
* @return {!proto.bet.beteran.rbac.Role} returns this
*/
proto.bet.beteran.rbac.Role.prototype.setDescription = function (value) {
return jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional bool can_use = 6;
* @return {boolean}
*/
proto.bet.beteran.rbac.Role.prototype.getCanUse = function () {
return /** @type {boolean} */ (
jspb.Message.getBooleanFieldWithDefault(this, 6, false)
);
};
/**
* @param {boolean} value
* @return {!proto.bet.beteran.rbac.Role} returns this
*/
proto.bet.beteran.rbac.Role.prototype.setCanUse = function (value) {
return jspb.Message.setProto3BooleanField(this, 6, value);
};
/**
* optional uint64 created_at = 7;
* @return {number}
*/
proto.bet.beteran.rbac.Role.prototype.getCreatedAt = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/**
* @param {number} value
* @return {!proto.bet.beteran.rbac.Role} returns this
*/
proto.bet.beteran.rbac.Role.prototype.setCreatedAt = function (value) {
return jspb.Message.setProto3IntField(this, 7, value);
};
/**
* optional uint64 updated_at = 8;
* @return {number}
*/
proto.bet.beteran.rbac.Role.prototype.getUpdatedAt = function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
};
/**
* @param {number} value
* @return {!proto.bet.beteran.rbac.Role} returns this
*/
proto.bet.beteran.rbac.Role.prototype.setUpdatedAt = function (value) {
return jspb.Message.setProto3IntField(this, 8, value);
};
goog.object.extend(exports, proto.bet.beteran.rbac);