Commit af5a5f1d authored by nanahira's avatar nanahira

fix missing unique field

parent 529aa459
...@@ -28,7 +28,8 @@ __decorate([ ...@@ -28,7 +28,8 @@ __decorate([
__metadata("design:type", String) __metadata("design:type", String)
], Ban.prototype, "name", void 0); ], Ban.prototype, "name", void 0);
Ban = __decorate([ Ban = __decorate([
typeorm_1.Entity() typeorm_1.Entity(),
typeorm_1.Unique(["ip", "name"])
], Ban); ], Ban);
exports.Ban = Ban; exports.Ban = Ban;
//# sourceMappingURL=Ban.js.map //# sourceMappingURL=Ban.js.map
\ No newline at end of file
import {Column, Entity, Index, PrimaryGeneratedColumn} from "typeorm"; import {Column, Entity, Index, PrimaryGeneratedColumn, Unique} from "typeorm";
@Entity() @Entity()
@Unique(["ip", "name"])
export class Ban { export class Ban {
@PrimaryGeneratedColumn({ unsigned: true, type: "bigint" }) @PrimaryGeneratedColumn({ unsigned: true, type: "bigint" })
id: number; id: number;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment