Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.blog.site_options.entities;
- import lombok.Getter;
- import javax.persistence.*;
- @Entity
- @Table(name="site_options__site_option",
- uniqueConstraints = {
- @UniqueConstraint(name = "theme_unique_constraint", columnNames= "theme"),
- })
- @Getter
- public class SiteOptionsEntity {
- @Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- int id;
- @Column(nullable = false)
- private String theme;
- }
- Table "public.site_options__site_option"
- Column | Type | Collation | Nullable | Default
- --------+------------------------+-----------+----------+----------------------------------
- id | integer | | not null | generated by default as identity
- theme | character varying(255) | | not null |
- Indexes:
- "site_options__site_option_pkey" PRIMARY KEY, btree (id)
- "theme_unique_constraint" UNIQUE CONSTRAINT, btree (theme)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement