1313 * limitations under the License.
1414 **/
1515
16+ use App \Models \Utils \BaseEntity ;
1617use Auth \User ;
1718use Doctrine \ORM \Mapping as ORM ;
1819
1920#[ORM \Table(name: 'two_factor_audit_log ' )]
2021#[ORM \Entity(repositoryClass: \App \Repositories \DoctrineTwoFactorAuditLogRepository::class)]
21- class TwoFactorAuditLog
22+ class TwoFactorAuditLog extends BaseEntity
2223{
2324 public const EventChallengeIssued = 'challenge_issued ' ;
2425 public const EventChallengeSucceeded = 'challenge_succeeded ' ;
@@ -55,11 +56,6 @@ class TwoFactorAuditLog
5556 self ::MethodRecovery,
5657 ];
5758
58- #[ORM \Id]
59- #[ORM \GeneratedValue]
60- #[ORM \Column(name: 'id ' , type: 'integer ' , unique: true , nullable: false )]
61- protected $ id ;
62-
6359 #[ORM \JoinColumn(name: 'user_id ' , referencedColumnName: 'id ' , onDelete: 'CASCADE ' )]
6460 #[ORM \ManyToOne(targetEntity: \Auth \User::class)]
6561 private $ user ;
@@ -79,20 +75,13 @@ class TwoFactorAuditLog
7975 #[ORM \Column(name: 'metadata ' , type: 'json ' , nullable: true )]
8076 private $ metadata ;
8177
82- #[ORM \Column(name: 'created_at ' , type: 'datetime ' )]
83- private $ created_at ;
8478
8579 public function __construct ()
8680 {
87- $ this -> created_at = new \ DateTime ( ' now ' , new \ DateTimeZone ( ' UTC ' ) );
81+ parent :: __construct ( );
8882 $ this ->metadata = null ;
8983 }
9084
91- public function getId (): int
92- {
93- return (int ) $ this ->id ;
94- }
95-
9685 public function getUser (): User
9786 {
9887 return $ this ->user ;
@@ -158,9 +147,4 @@ public function setMetadata(?array $value): void
158147 {
159148 $ this ->metadata = $ value ;
160149 }
161-
162- public function getCreatedAt (): \DateTime
163- {
164- return $ this ->created_at ;
165- }
166150}
0 commit comments